Changeset 1056 for trunk/picture.php


Ignore:
Timestamp:
Feb 24, 2006, 2:16:30 AM (18 years ago)
Author:
rvelices
Message:

fix: remove all php warnings and notices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r1052 r1056  
    380380}
    381381
    382 if ( $page['cat'] == 'search' )
    383 {
    384   $url_up.= '&search='.$_GET['search'];
    385 }
    386 if ( $page['cat'] == 'list' )
    387 {
    388   $url_up.= '&list='.$_GET['list'];
     382if ( isset($page['cat']) )
     383{
     384  if ( $page['cat'] == 'search' )
     385  {
     386    $url_up.= '&search='.$_GET['search'];
     387  }
     388  if ( $page['cat'] == 'list' )
     389  {
     390    $url_up.= '&list='.$_GET['list'];
     391  }
    389392}
    390393
    391394$url_admin =
    392395  PHPWG_ROOT_PATH.'admin.php?page=picture_modify'
    393   .'&cat_id='.$page['cat']
     396  .'&cat_id='. ( isset($page['cat']) ? $page['cat'] : '' )
    394397  .'&image_id='.$_GET['image_id'];
    395398
     
    414417    $result = pwg_query( $query );
    415418  }
    416   if ( !$_GET['add_fav'] and $page['cat'] == 'fav' )
     419  if ( !$_GET['add_fav'] and isset($page['cat']) and 'fav'==$page['cat'] )
    417420  {
    418421    if (!isset($page['previous_item']) and !isset($page['next_item']))
     
    538541
    539542$title_img = $picture['current']['name'];
    540 if (is_numeric( $page['cat'] ))
    541 {
    542   $title_img = replace_space(get_cat_display_name($page['cat_name']));
    543 }
    544 else if ( $page['cat'] == 'search' )
    545 {
    546   $title_img = replace_search( $title_img, $_GET['search'] );
     543if ( isset( $page['cat'] ) )
     544{
     545  if (is_numeric( $page['cat'] ))
     546  {
     547    $title_img = replace_space(get_cat_display_name($page['cat_name']));
     548  }
     549  else if ( $page['cat'] == 'search' )
     550  {
     551    $title_img = replace_search( $title_img, $_GET['search'] );
     552  }
    547553}
    548554$title_nb = ($page['current_rank'] + 1).'/'.$page['cat_nb_images'];
     
    681687}
    682688// button to set the current picture as representative
    683 if ('admin' == $user['status'] and is_numeric($page['cat']))
     689if ('admin' == $user['status'] and
     690    isset($page['cat']) and is_numeric($page['cat']))
    684691{
    685692  $template->assign_block_vars(
Note: See TracChangeset for help on using the changeset viewer.