aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-02-24 01:16:30 +0000
committerrvelices <rv-github@modusoptimus.com>2006-02-24 01:16:30 +0000
commit3aff4f0bfec650d7a080b919b299ddcf6fc6ee59 (patch)
tree6bebc39a9de733910e32b117d82944bde033c214 /picture.php
parent5fa3664567ad8240154566cce1f8479c4fd93909 (diff)
fix: remove all php warnings and notices
git-svn-id: http://piwigo.org/svn/trunk@1056 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--picture.php37
1 files changed, 22 insertions, 15 deletions
diff --git a/picture.php b/picture.php
index d9b633f18..000af4caf 100644
--- a/picture.php
+++ b/picture.php
@@ -379,18 +379,21 @@ if ($url_up_start>0)
$url_up .= '&amp;start='.$url_up_start;
}
-if ( $page['cat'] == 'search' )
-{
- $url_up.= '&amp;search='.$_GET['search'];
-}
-if ( $page['cat'] == 'list' )
+if ( isset($page['cat']) )
{
- $url_up.= '&amp;list='.$_GET['list'];
+ if ( $page['cat'] == 'search' )
+ {
+ $url_up.= '&amp;search='.$_GET['search'];
+ }
+ if ( $page['cat'] == 'list' )
+ {
+ $url_up.= '&amp;list='.$_GET['list'];
+ }
}
$url_admin =
PHPWG_ROOT_PATH.'admin.php?page=picture_modify'
- .'&amp;cat_id='.$page['cat']
+ .'&amp;cat_id='. ( isset($page['cat']) ? $page['cat'] : '' )
.'&amp;image_id='.$_GET['image_id'];
$url_slide =
@@ -413,7 +416,7 @@ if ( isset( $_GET['add_fav'] ) )
$query.= ';';
$result = pwg_query( $query );
}
- if ( !$_GET['add_fav'] and $page['cat'] == 'fav' )
+ if ( !$_GET['add_fav'] and isset($page['cat']) and 'fav'==$page['cat'] )
{
if (!isset($page['previous_item']) and !isset($page['next_item']))
{
@@ -537,13 +540,16 @@ if ( isset( $_GET['slideshow'] ) and isset($page['next_item']) )
}
$title_img = $picture['current']['name'];
-if (is_numeric( $page['cat'] ))
+if ( isset( $page['cat'] ) )
{
- $title_img = replace_space(get_cat_display_name($page['cat_name']));
-}
-else if ( $page['cat'] == 'search' )
-{
- $title_img = replace_search( $title_img, $_GET['search'] );
+ if (is_numeric( $page['cat'] ))
+ {
+ $title_img = replace_space(get_cat_display_name($page['cat_name']));
+ }
+ else if ( $page['cat'] == 'search' )
+ {
+ $title_img = replace_search( $title_img, $_GET['search'] );
+ }
}
$title_nb = ($page['current_rank'] + 1).'/'.$page['cat_nb_images'];
@@ -680,7 +686,8 @@ if (isset($picture['current']['high']))
);
}
// button to set the current picture as representative
-if ('admin' == $user['status'] and is_numeric($page['cat']))
+if ('admin' == $user['status'] and
+ isset($page['cat']) and is_numeric($page['cat']))
{
$template->assign_block_vars(
'representative',