mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
- bug fixed: during file tree synchronization, warning on finding the next
rank of category which has no sub-categories yet. git-svn-id: http://piwigo.org/svn/trunk@913 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -116,9 +116,21 @@ SELECT galleries_url
|
||||
// we need to have fulldirs as keys to make efficient comparison
|
||||
$db_fulldirs = array_flip($db_fulldirs);
|
||||
|
||||
// finding next rank for each id_uppercat
|
||||
// finding next rank for each id_uppercat. By default, each category id
|
||||
// has 1 for next rank on its sub-categories to create
|
||||
$next_rank['NULL'] = 1;
|
||||
|
||||
$query = '
|
||||
SELECT id
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = mysql_fetch_array($result))
|
||||
{
|
||||
$next_rank[$row['id']] = 1;
|
||||
}
|
||||
|
||||
// let's see if some categories already have some sub-categories...
|
||||
$query = '
|
||||
SELECT id_uppercat, MAX(rank)+1 AS next_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
2005-10-23 Pierrick LE GALL
|
||||
|
||||
* bug fixed: during file tree synchronization, warning on finding
|
||||
the next rank of category which has no sub-categories yet.
|
||||
|
||||
2005-10-23 chrisaga
|
||||
|
||||
* bug fixed: cat-list.tpl validate now
|
||||
|
||||
Reference in New Issue
Block a user