diff options
author | plegall <plg@piwigo.org> | 2004-12-28 16:31:58 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2004-12-28 16:31:58 +0000 |
commit | 4f11be1410a3289ac4cc37f688c491b077ddc83f (patch) | |
tree | eea20dada0159cad29360739a9e2f72aa5015f0f /admin/update.php | |
parent | 7ba15740434b476e8aef0253919f19ba37e07dc7 (diff) |
- 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
Diffstat (limited to 'admin/update.php')
-rw-r--r-- | admin/update.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/admin/update.php b/admin/update.php index 9926f24ed..fa622498a 100644 --- a/admin/update.php +++ b/admin/update.php @@ -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)); |