From 384ec739f6c11ab82f9a57e9398e954206c7a7ca Mon Sep 17 00:00:00 2001 From: gweltas Date: Thu, 15 Jan 2004 17:06:45 +0000 Subject: Correction of php warnings git-svn-id: http://piwigo.org/svn/branches/release-1_3@280 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_category.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/functions_category.inc.php') diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index e27573ad7..de074e82c 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -406,7 +406,7 @@ function get_cat_display_name( $array_cat_names, $separation, function initialize_category( $calling_page = 'category' ) { pwg_debug( 'start initialize_category' ); - global $page,$lang,$user,$conf; + global $page,$lang,$user,$conf, $where_append; if ( isset( $page['cat'] ) ) { @@ -537,13 +537,13 @@ function initialize_category( $calling_page = 'category' ) $page['where'] = ' WHERE category_id != -1'.$where_append; $conf['order_by'] = ' ORDER BY hit DESC, file ASC'; $page['cat_nb_images'] = $conf['top_number']; - if ( $page['start'] + $user['nb_image_page'] >= $conf['top_number'] ) + if ( isset($page['start']) && ($page['start']+ $user['nb_image_page'] >= $conf['top_number'] )) { $page['nb_image_page'] = $conf['top_number'] - $page['start']; } } - if ( $query != '' ) + if ( isset($query)) { $result = mysql_query( $query ); $row = mysql_fetch_array( $result ); -- cgit v1.2.3