diff options
author | plegall <plg@piwigo.org> | 2004-11-23 22:31:24 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2004-11-23 22:31:24 +0000 |
commit | f0fcd1eedc26c0d36b6b0556b9f53124ba9f889f (patch) | |
tree | 0502dbd43c04199ec2ba45913985fee86793491a /category.php | |
parent | 5197779bba12db45508becc910d5886d77f3675d (diff) |
- global categories' options : instead of N horizontal tabs on a single
page, N options in the left menu (but the same backend)
- categories.global_rank : new calculated field. It gives a global rank of
the category among all others (updated during ordering)
- category.php page : menu is generated faster thanks to
categories.global_rank, recursivity becomes useless :-)
- new function to display select box with a set of categories :
display_select_cat_wrapper
- cat_options : instead of using 1 multiselect for true/false items, using 1
multiselect for true, and another one for false. The form provides buttons
with arrows to switch categories from one multiselect to another
- deletion of obsolete function display_categories (working with the old
template system)
- deletion of obsolete functions get_user_plain_structure,
create_user_structure, get_user_subcat_ids, update_structure, count_images
: useless thanks to global_rank
git-svn-id: http://piwigo.org/svn/trunk@614 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | category.php | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/category.php b/category.php index 0fe1ad2a8..1d9c75fe4 100644 --- a/category.php +++ b/category.php @@ -39,11 +39,14 @@ if ( isset( $_GET['act'] ) redirect( $url ); } //-------------------------------------------------- access authorization check -if ( isset( $_GET['cat'] ) ) check_cat_id( $_GET['cat'] ); +if (isset($_GET['cat'])) +{ + check_cat_id($_GET['cat']); +} check_login_authorization(); -if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) ) +if (isset($page['cat']) and is_numeric($page['cat'])) { - check_restrictions( $page['cat'] ); + check_restrictions($page['cat']); } //-------------------------------------------------------------- initialization // detection of the start picture to display @@ -90,14 +93,6 @@ if ( $user['expand'] ) { $page['tab_expand'] = array(); } - -// creating the structure of the categories (useful for displaying the menu) -// creating the plain structure : array of all the available categories and -// their relative informations, see the definition of the function -// get_user_plain_structure for further details. -$page['plain_structure'] = get_user_plain_structure(); -$page['structure'] = create_user_structure( '' ); -$page['structure'] = update_structure( $page['structure'] ); //----------------------------------------------------- template initialization // // Start output of page @@ -106,7 +101,6 @@ $title = $page['title']; include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->set_filenames( array('category'=>'category.tpl') ); - //-------------------------------------------------------------- category title if ( !isset( $page['title'] ) ) { @@ -120,18 +114,12 @@ if ( isset( $page['cat_nb_images'] ) and $page['cat_nb_images'] > 0 ) $icon_recent = get_icon(date('Y-m-d')); -$page['menu'] = ''; -foreach ($page['structure'] as $category) -{ - $page['menu'].= get_html_menu_category($category); -} - $template->assign_vars(array( 'NB_PICTURE' => count_user_total_images(), 'TITLE' => $template_title, 'USERNAME' => $user['username'], 'TOP_NUMBER'=>$conf['top_number'], - 'MENU_CATEGORIES_CONTENT'=>$page['menu'], + 'MENU_CATEGORIES_CONTENT'=>get_categories_menu(), 'L_CATEGORIES' => $lang['categories'], 'L_HINT_CATEGORY' => $lang['hint_category'], |