From 0fa0c8bb07c80884ac8b79560ba4c4119abfcd5c Mon Sep 17 00:00:00 2001 From: gweltas Date: Mon, 12 Jan 2004 23:41:53 +0000 Subject: Minor corrections of PHP warnings git-svn-id: http://piwigo.org/svn/branches/release-1_3@276 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_category.inc.php | 17 ++++++++++++----- include/functions_user.inc.php | 6 ++++-- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 1cbe30b25..e27573ad7 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -109,12 +109,15 @@ function get_user_plain_structure() { $category = array(); foreach ( $infos as $info ) { - $category[$info] = $row[$info]; - if ( $info == 'date_last' ) + if ( $info == 'uc.date_last' ) { - list($year,$month,$day) = explode( '-', $row[$info] ); - $category[$info] = mktime(0,0,0,$month,$day,$year); + list($year,$month,$day) = explode( '-', $row['date_last'] ); + $category['date_last'] = mktime(0,0,0,$month,$day,$year); } + else + { + $category[$info] = $row[$info]; + } } $plain_structure[$row['id']] = $category; } @@ -411,7 +414,11 @@ function initialize_category( $calling_page = 'category' ) // By default, it is the same as the $user['nb_image_page'] $page['nb_image_page'] = $user['nb_image_page']; // $url is used to create the navigation bar - $url = './category.php?cat='.$page['cat'].'&expand='.$page['expand']; + $url = './category.php?cat='.$page['cat']; + if ( isset($page['expand']) ) + { + $url.= '&expand='.$page['expand']; + } // simple category if ( is_numeric( $page['cat'] ) ) { diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 050d83c6d..c623cf0c7 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -207,12 +207,14 @@ function check_login_authorization() { global $user,$lang,$conf,$page; - if ( $user['is_the_guest'] - and ( $conf['access'] == 'restricted' or $page['cat'] == 'fav' ) ) + if ( $user['is_the_guest']) + { + if ( $conf['access'] == 'restricted' || (isset($page['cat']) && $page['cat'] == 'fav' ) ) { echo '
'.$lang['only_members'].'
'; echo ''.$lang['ident_title'].'
'; exit(); } + } } ?> \ No newline at end of file -- cgit v1.2.3