aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_category.inc.php6
1 files changed, 3 insertions, 3 deletions
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 );