improvement: $page['where'] string replaced by $page['items'].

$page['where'] was an SQL clause used to retrieve pictures in #images
table. $page['items'] is the list of picture ids of the current section.

improvement: function initialize_category replaced by dedicated included PHP
script include/section_init.inc.php. Code was refactored to improve
readibility and maintenability. $page['navigation_bar'] is now build in
category.php instead of initialize_category function. Function check_cat_id
was also replaced by a piece of code in the new file. The file to include to
display thumbnails from category.php is now set in section_init.inc.php
instead of calculated in category.php.

bug fix: the test for rel="up" link for standard HTML navigation links in
category menu was not working with non numeric categories, such as
"favorites".

improvement: function check_login_authorization removed because useless but
in profile.php.


git-svn-id: http://piwigo.org/svn/trunk@1036 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2006-02-12 21:52:16 +00:00
parent 2dc2eb8630
commit dac7decfb5
12 changed files with 646 additions and 612 deletions

View file

@ -349,7 +349,8 @@ function get_html_menu_category($categories)
$ref_level = 0;
$level = 0;
$menu = '';
// $page_cat value remains 0 for special sections
$page_cat = 0;
if (isset($page['cat']) and is_numeric($page['cat']) )
{
@ -383,7 +384,8 @@ function get_html_menu_category($categories)
$url = PHPWG_ROOT_PATH.'category.php?cat='.$category['id'];
$menu.= "\n".'<a href="'.$url.'"';
if ($category['id'] == $page['cat_id_uppercat'])
if ($page_cat != 0
and $category['id'] == $page['cat_id_uppercat'])
{
$menu.= ' rel="up"';
}