aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_cats.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-01-13 03:13:40 +0000
committerrvelices <rv-github@modusoptimus.com>2007-01-13 03:13:40 +0000
commit80754de17245e385bbbd7429bd2147312ee1b62e (patch)
tree9485ecefcebdc3440bb7792c133362992bdf66f8 /include/category_cats.inc.php
parented6d397aa1a82d6a8f0794b46a381fe746a0ae70 (diff)
very small improvements:
- mass_inserts does not requires keys to start at 0 - recent_cats categories are sorted by global_rank (consistency) - removed warning from page_header.php (when included from redirect) - added 2 template functions for plugins (get_var and concat_var) - removed unused code from profile.php - changed css width for tag selection (search page) from 55em to almost 100% git-svn-id: http://piwigo.org/svn/trunk@1719 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/category_cats.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index 67e666fb8..f6f188831 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
// | file : $Id$
@@ -37,7 +37,7 @@ if ($page['section']=='recent_cats')
$query = '
SELECT
id,name, representative_picture_id, comment, nb_images, uppercats,
- date_last, max_date_last, count_images, count_categories
+ date_last, max_date_last, count_images, count_categories, global_rank
FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
ON id = cat_id and user_id = '.$user['id'].'
WHERE date_last > SUBDATE(
@@ -151,6 +151,10 @@ SELECT representative_picture_id
unset($image_id);
}
+if ($page['section']=='recent_cats')
+{
+ usort($categories, 'global_rank_compare');
+}
if (count($categories) > 0)
{
$thumbnail_src_of = array();