mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-10 10:42:59 +02:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user