mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 09:43:01 +02:00
- sql optim: do not include category_cats (which makes a query) if current category does not have children (info known when building menubar)
- in index.php - fill the template completely before including menubar/category_cats/thumbnails (some themes might want to use in the menubar some vars ...) git-svn-id: http://piwigo.org/svn/trunk@2586 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -103,6 +103,8 @@ WHERE '.$where.'
|
||||
while ($row = mysql_fetch_assoc($result))
|
||||
{
|
||||
array_push($cats, $row);
|
||||
if ($row['id']==@$page['category']['id']) //save the number of subcats for later optim
|
||||
$page['category']['count_categories'] = $row['count_categories'];
|
||||
}
|
||||
usort($cats, 'global_rank_compare');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user