diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-07-19 23:45:57 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-07-19 23:45:57 +0000 |
commit | 7f480b6ec63af411953063ca29c43bc428193fe6 (patch) | |
tree | 68a5eeb43b2856f110ae09e7469722be5b89fb49 /include/functions_category.inc.php | |
parent | 26d643fbe861115fef0ae0974387a3b11b5840dc (diff) |
merge -r2069 from branch-1_7 to trunk
added 2 events: get_categories_menu_sql_where and get_html_menu_category in order to allow personalisation of the category menu
git-svn-id: http://piwigo.org/svn/trunk@2070 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_category.inc.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 2c1150321..c23c4a395 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -72,29 +72,33 @@ FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' // Always expand when filter is activated if (!$user['expand'] and !$filter['enabled']) { - $query.= ' -WHERE + $where = ' (id_uppercat is NULL'; if (isset($page['category'])) { - $query.= ' OR id_uppercat IN ('.$page['category']['uppercats'].')'; + $where .= ' OR id_uppercat IN ('.$page['category']['uppercats'].')'; } - $query.= ')'; + $where .= ')'; } else { - $query.= ' + $where = ' '.get_sql_condition_FandF ( array ( 'visible_categories' => 'id', ), - 'WHERE' + null, + true ); } + $where = trigger_event('get_categories_menu_sql_where', + $where, $user['expand'], $filter['enabled'] ); + $query.= ' +WHERE '.$where.' ;'; $result = pwg_query($query); |