Changeset 280


Ignore:
Timestamp:
Jan 15, 2004, 6:06:45 PM (20 years ago)
Author:
gweltas
Message:

Correction of php warnings

Location:
branches/release-1_3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_3/admin/stats.php

    r195 r280  
    4343$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
    4444//--------------------------------------------------- number of days to display
    45 if ( isset( $_GET['last_days'] ) ) define( MAX_DAYS, $_GET['last_days'] );
    46 else                               define( MAX_DAYS, 0 );
     45if ( isset( $_GET['last_days'] ) ) define( 'MAX_DAYS', $_GET['last_days'] );
     46else                               define( 'MAX_DAYS', 0 );
    4747
    4848foreach ( $conf['last_days'] as $option ) {
    4949  $vtp->addSession( $sub, 'last_day_option' );
    5050  $vtp->setVar( $sub, 'last_day_option.option', $option );
    51   $url = './admin.php?page=stats&expand='.$_GET['expand'];
     51  $url = './admin.php?page=stats';
     52  if (isset($_GET['expand']))
     53          $url .='&expand='.$_GET['expand'];
    5254  $url.= '&last_days='.($option - 1);
    5355  $vtp->setVar( $sub, 'last_day_option.link', add_session_id( $url ) );
     
    6062//---------------------------------------------------------------- log  history
    6163// empty link
    62 $url = './admin.php?page=stats&last_days='.$_GET['last_days'];
    63 $url.= '&expand='.$_GET['expand'];
     64$url = './admin.php?page=stats';
     65if (isset($_GET['last_days']))
     66        $url .='&last_days='.$_GET['last_days'];
     67// expand array management
     68$expand_days = array();
     69if (isset($_GET['expand']))
     70{
     71        $url.= '&expand='.$_GET['expand'];
     72        $expand_days = explode( ',', $_GET['expand'] );
     73}
    6474$url.= '&act=empty';
    6575$vtp->setVar( $sub, 'emply_url', add_session_id( $url ) );
    66 // expand array management
    67 $expand_days = explode( ',', $_GET['expand'] );
    6876$page['expand_days'] = array();
    6977foreach ( $expand_days as $expand_day ) {
     
    100108    array_push( $local_expand, $i );
    101109  }
    102   $url = './admin.php?page=stats&last_days='.$_GET['last_days'];
     110  $url = './admin.php?page=stats';
     111  if (isset($_GET['last_days']))
     112        $url.= '&last_days='.$_GET['last_days'];
    103113  $url.= '&expand='.implode( ',', $local_expand );
    104114  $vtp->setVar( $sub, 'day.url', add_session_id( $url ) );
  • branches/release-1_3/admin/thumbnail.php

    r57 r280  
    254254    $vtp->closeSession( $sub, 'dir' );
    255255    // recursive call
    256     $dirs.= get_displayed_dirs( $dir.'/'.$sub_dir,
    257                                 $indent+30 );
    258    
     256    get_displayed_dirs( $dir.'/'.$sub_dir,
     257                                $indent+30 );   
    259258  }
    260259}
  • branches/release-1_3/admin/user_list.php

    r164 r280  
    110110  $action = './admin.php?'.$_SERVER['QUERY_STRING'];
    111111  $vtp->setVar( $sub, 'add_user.form_action', $action );
    112   $vtp->setVar( $sub, 'add_user.f_username', $_POST['username'] );
     112  if (isset( $_POST['username']))
     113          $vtp->setVar( $sub, 'add_user.f_username', $_POST['username'] );
    113114  $vtp->closeSession( $sub, 'add_user' );
    114115 
  • branches/release-1_3/admin/user_perm.php

    r261 r280  
    6060}
    6161//---------------------------------------------------------------- form display
    62 $restrictions = get_restrictions( $_GET['user_id'], $page['user_status'],
     62$restrictions = get_user_restrictions( $_GET['user_id'], $page['user_status'],
    6363                                  false, false );
    6464$action = './admin.php?page=user_perm&user_id='.$_GET['user_id'];
  • branches/release-1_3/include/functions_category.inc.php

    r276 r280  
    407407{
    408408  pwg_debug( 'start initialize_category' );
    409   global $page,$lang,$user,$conf;
     409  global $page,$lang,$user,$conf, $where_append;
    410410
    411411  if ( isset( $page['cat'] ) )
     
    538538        $conf['order_by'] = ' ORDER BY hit DESC, file ASC';
    539539        $page['cat_nb_images'] = $conf['top_number'];
    540         if ( $page['start'] + $user['nb_image_page'] >= $conf['top_number'] )
     540        if ( isset($page['start']) &&  ($page['start']+ $user['nb_image_page'] >= $conf['top_number'] ))
    541541        {
    542542          $page['nb_image_page'] = $conf['top_number'] - $page['start'];
     
    544544      }
    545545
    546       if ( $query != '' )
     546      if ( isset($query))
    547547      {
    548548        $result = mysql_query( $query );
  • branches/release-1_3/picture.php

    r279 r280  
    7272$page['width']          = $row['width'];
    7373$page['height']         = $row['height'];
    74 $page['category_id']    = $row['category_id'];
     74if (is_numeric( $page['cat'] ))
     75        $page['category_id']    = $row['category_id'];
    7576$page['keywords']       = $row['keywords'];
    7677$page['storage_category_id'] = $row['storage_category_id'];
     
    493494  $row = mysql_fetch_array( $result );
    494495
    495   if ( $array_cat_directories[$row['storage_category_id']] == '' )
     496  if ( !isset($array_cat_directories[$row['storage_category_id']]))
    496497  {
    497498    $array_cat_directories[$row['storage_category_id']] =
  • branches/release-1_3/register.php

    r105 r280  
    7171$vtp->addSession( $handle, 'text' );
    7272$vtp->setVar( $handle, 'text.name', 'login' );
    73 $vtp->setVar( $handle, 'text.value', $_POST['login'] );
     73if (isset( $_POST['login']))
     74        $vtp->setVar( $handle, 'text.value', $_POST['login'] );
    7475$vtp->closeSession( $handle, 'text' );
    7576$vtp->closeSession( $handle, 'line' );
     
    9596$vtp->addSession( $handle, 'text' );
    9697$vtp->setVar( $handle, 'text.name', 'mail_address' );
    97 $vtp->setVar( $handle, 'text.value', $_POST['mail_address'] );
     98if (isset( $_POST['mail_address']))
     99        $vtp->setVar( $handle, 'text.value', $_POST['mail_address'] );
    98100$vtp->closeSession( $handle, 'text' );
    99101$vtp->closeSession( $handle, 'line' );
  • branches/release-1_3/template/default/htmlfunctions.inc.php

    r276 r280  
    178178  $vtp->addSession( $handle, 'category' );
    179179  $vtp->setVar( $handle, 'category.indent', $indent );
    180 
    181180  if ( $user['expand'] or $category['nb_sub_categories'] == 0 )
    182181  {
     
    194193        $url .='?cat='.$page['cat'];
    195194    $url.= '&expand='.$category['expand_string'];
    196     if ( $page['cat'] == 'search' )
    197     {
    198       $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode'];
    199     }
     195        }
     196        else if ($category['expand_string']<>'')
     197        {
     198                $url.= '?expand='.$category['expand_string'];
    200199        }
    201200    $vtp->setVar( $handle, 'bullet_w_link.bullet_link', add_session_id($url) );
Note: See TracChangeset for help on using the changeset viewer.