- bugs fixed in filesystem synchronization : if no existing category at

start, need to initialize $next_rank['NULL'], $next_id and
  $next_element_id

- bug fixed : if no queries executed on the page, $count_queries and
  $queries_time are not initialized for page bottom display

- no use of $conf['prefix_thumbnail'] in language information
  (admin.lang.php)


git-svn-id: http://piwigo.org/svn/trunk@660 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2004-12-28 16:31:58 +00:00
parent 7ba1574043
commit 4f11be1410
3 changed files with 12 additions and 4 deletions
+4 -2
View File
@@ -115,6 +115,8 @@ SELECT galleries_url
$db_fulldirs = array_flip($db_fulldirs);
// finding next rank for each id_uppercat
$next_rank['NULL'] = 1;
$query = '
SELECT id_uppercat, MAX(rank)+1 AS next_rank
FROM '.CATEGORIES_TABLE.'
@@ -133,7 +135,7 @@ SELECT id_uppercat, MAX(rank)+1 AS next_rank
// next category id available
$query = '
SELECT MAX(id)+1 AS next_id
SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
FROM '.CATEGORIES_TABLE.'
;';
list($next_id) = mysql_fetch_array(pwg_query($query));
@@ -296,7 +298,7 @@ SELECT file,storage_category_id
// next element id available
$query = '
SELECT MAX(id)+1 AS next_element_id
SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
FROM '.IMAGES_TABLE.'
;';
list($next_element_id) = mysql_fetch_array(pwg_query($query));