aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-07-19 23:39:43 +0000
committerrvelices <rv-github@modusoptimus.com>2007-07-19 23:39:43 +0000
commite78758a25cb0cd34350ae5aa681323f20fce600a (patch)
treef4169a4ee4d366ff31d05f059863129e41bf01f5 /include/functions_category.inc.php
parent027d0c8846615019dafb59440f7245aab0ada28d (diff)
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/branches/branch-1_7@2069 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_category.inc.php')
-rw-r--r--include/functions_category.inc.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index 5d1679e5c..113af6dd9 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);