- upgrade scripts added for releases 1.3.x

- my_error function moved from admin/include/functions.php to
  include/functions.inc.php

- because MySQL temporary tables are not always authorized on creation, use
  a temporary table name (with the current microsecond) on a non temporary
  table (in mass_updates function)

- ability to retrieve distant full directories (usefull in upgrade scripts)

- global variables $count_queries and $queries_time moved into global array
  $page

- get_cat_display_name displays category names in correct order : the one
  given by uppercats

- function setup_style simplified

- default value for configuration parameter "show_nb_comments" set to false
  (less queries by default)


git-svn-id: http://piwigo.org/svn/trunk@672 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2005-01-06 22:16:21 +00:00
commit 79c440d8bb
12 changed files with 2129 additions and 59 deletions

View file

@ -221,18 +221,23 @@ SELECT '.implode(',', $infos).'
}
$cat['comment'] = nl2br($cat['comment']);
$cat['name'] = array();
$names = array();
$query = '
SELECT name,id
FROM '.CATEGORIES_TABLE.'
WHERE id IN ('.$cat['uppercats'].')
ORDER BY id ASC
;';
$result = pwg_query($query);
while($row = mysql_fetch_array($result))
{
$cat['name'][$row['id']] = $row['name'];
$names[$row['id']] = $row['name'];
}
// category names must be in the same order than uppercats list
$cat['name'] = array();
foreach (explode(',', $cat['uppercats']) as $cat_id)
{
$cat['name'][$cat_id] = $names[$cat_id];
}
return $cat;