aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_category.inc.php16
-rw-r--r--include/functions_html.inc.php12
2 files changed, 19 insertions, 9 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);
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 1acdb15ad..cae82be2e 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -394,7 +394,13 @@ function get_html_menu_category($categories, $selected_category)
$ref_level = 0;
$level = 0;
- $menu = '';
+
+ $menu = trigger_event('get_html_menu_category', '',
+ $categories, $selected_category);
+ if (strlen($menu))
+ {
+ return $menu;
+ }
foreach ($categories as $category)
{
@@ -437,13 +443,13 @@ function get_html_menu_category($categories, $selected_category)
' / '
);
- $menu.= "\n".'<a href="'.$url.'"';
+ $menu.= '<a href="'.$url.'"';
if ($selected_category!=null
and $category['id'] == $selected_category['id_uppercat'])
{
$menu.= ' rel="up"';
}
- $menu.= ' title=" '.$title.'">'.$category['name'].'</a>';
+ $menu.= ' title="'.$title.'">'.$category['name'].'</a>';
if ( $category['count_images']>0 )
{// at least one direct or indirect image