diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-02-27 01:56:16 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-02-27 01:56:16 +0000 |
commit | 47512ce6a64fa356214c162a8313480c6aed41d2 (patch) | |
tree | a0e35e2f89ef789f380adc5b8951444c189de4e7 /include/category_cats.inc.php | |
parent | bfb4b15d2f75835033d9bbb865edd77dcb282bb6 (diff) |
- refactoring page['category'] before 1.7 release
page['category'] is not an id anymore, but an associative array of category info
all of page['cat_xxx'] or page['uppercats'] merged into one
simplifies calls to make_index_url
give plugins a clean start for page variables for version 1.7
git-svn-id: http://piwigo.org/svn/trunk@1861 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_cats.inc.php')
-rw-r--r-- | include/category_cats.inc.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php index 2acb05f13..e9549ba44 100644 --- a/include/category_cats.inc.php +++ b/include/category_cats.inc.php @@ -35,7 +35,7 @@ if ($page['section']=='recent_cats') // $user['forbidden_categories'] including with USER_CACHE_CATEGORIES_TABLE $query = ' SELECT - id,name, representative_picture_id, comment, nb_images, uppercats, + id, name, representative_picture_id, comment, nb_images, uppercats, 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'].' @@ -57,12 +57,12 @@ else // $user['forbidden_categories'] including with USER_CACHE_CATEGORIES_TABLE $query = ' SELECT - id,name, representative_picture_id, comment, nb_images, + id, name, representative_picture_id, comment, nb_images, date_last, max_date_last, count_images, count_categories FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON id = cat_id and user_id = '.$user['id'].' WHERE id_uppercat '. - (!isset($page['category']) ? 'is NULL' : '= '.$page['category']).' + (!isset($page['category']) ? 'is NULL' : '= '.$page['category']['id']).' '.get_sql_condition_FandF ( array @@ -206,8 +206,7 @@ if (count($categories) > 0) 'URL' => make_index_url( array( - 'category' => $category['id'], - 'cat_name' => $category['name'], + 'category' => $category ) ), 'CAPTION_NB_IMAGES' => get_display_images_count @@ -258,8 +257,7 @@ if (count($categories) > 0) 'U_IMG_LINK' => make_index_url( array( - 'category' => $category['id'], - 'cat_name' => $category['name'], + 'category' => $category ) ), 'CLASS' => 'thumbCat', |