aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-02-10 02:10:41 +0000
committerrvelices <rv-github@modusoptimus.com>2006-02-10 02:10:41 +0000
commitda21a99873a5fd74e4d476fdc948bb052a267949 (patch)
tree0590e5dd81ba1577f8c1f1b7ed5d6568551d02ba /include/functions_category.inc.php
parentc8e9793412ac8207754021a69753ead23a6c29d5 (diff)
feature 77: standard navigation link - finalized
3 small fixes: simplified code (unnecessary $page['tab_expand']), urls in comments (at end of line nl2br issue+regex+html 4 validated) and $page['where'] correction for most_visited git-svn-id: http://piwigo.org/svn/trunk@1031 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_category.inc.php')
-rw-r--r--include/functions_category.inc.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index 9e0e16a1d..351fa1007 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -132,9 +132,9 @@ SELECT name,id,date_last,nb_images,global_rank
{
$query.= '
AND (id_uppercat is NULL';
- if (isset ($page['tab_expand']) and count($page['tab_expand']) > 0)
+ if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
{
- $query.= ' OR id_uppercat IN ('.implode(',',$page['tab_expand']).')';
+ $query.= ' OR id_uppercat IN ('.$page['uppercats'].')';
}
$query.= ')';
}
@@ -323,12 +323,12 @@ function get_category_preferred_image_orders()
{
global $conf;
return array(
- array('Default', '', true),
- array(get_lang('best_rated_cat'), 'average_rate DESC', $conf['rate']),
- array(get_lang('most_visited_cat'), 'hit DESC', true),
- array(get_lang('Creation date'), 'date_creation DESC', true),
- array(get_lang('Availability date'), 'date_available DESC', true),
- array(get_lang('File name'), 'file ASC', true)
+ array('Default', '', true),
+ array(l10n('best_rated_cat'), 'average_rate DESC', $conf['rate']),
+ array(l10n('most_visited_cat'), 'hit DESC', true),
+ array(l10n('Creation date'), 'date_creation DESC', true),
+ array(l10n('Availability date'), 'date_available DESC', true),
+ array(l10n('File name'), 'file ASC', true)
);
}
@@ -371,6 +371,7 @@ function initialize_category( $calling_page = 'category' )
$page['cat_site_id'] = $result['site_id'];
$page['cat_uploadable'] = $result['uploadable'];
$page['cat_commentable'] = $result['commentable'];
+ $page['cat_id_uppercat'] = $result['id_uppercat'];
$page['uppercats'] = $result['uppercats'];
$page['title'] =
get_cat_display_name($page['cat_name'],
@@ -468,7 +469,7 @@ SELECT COUNT(DISTINCT(id)) AS nb_total_images
$page['where'] = 'WHERE hit > 0';
if (isset($forbidden))
{
- $page['where'] = "\n".' AND '.$forbidden;
+ $page['where'] .= "\n".' AND '.$forbidden;
}
$conf['order_by'] = ' ORDER BY hit DESC, file ASC';