Changeset 279


Ignore:
Timestamp:
Jan 15, 2004, 1:11:00 AM (20 years ago)
Author:
gweltas
Message:

Corretion of PHP warnings

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

Legend:

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

    r277 r279  
    432432{
    433433  // date arrives at this format : DD/MM/YYYY
    434   list($day,$month,$year) = explode( '/', $date );
     434  @list($day,$month,$year) = explode( '/', $date );
    435435  return @checkdate( $month, $day, $year );
    436436}
  • branches/release-1_3/admin/picture_modify.php

    r258 r279  
    8686    // category, the category is updated in the database (without wondering
    8787    // if this picture was already the representative one)
    88     if ( $_POST['representative-'.$row['category_id']] == 1 )
     88    if ( isset($_POST['representative-'.$row['category_id']]) )
    8989    {
    9090      $query = 'UPDATE '.PREFIX_TABLE.'categories';
     
    145145  while ( $row = mysql_fetch_array( $result ) )
    146146  {
    147     if ( $_POST['dissociate-'.$row['category_id']] == 1 )
     147    if ( isset($_POST['dissociate-'.$row['category_id']]) )
    148148    {
    149149      $query = 'DELETE FROM '.PREFIX_TABLE.'image_category';
  • branches/release-1_3/category.php

    r276 r279  
    463463                  get_cat_display_name( $page['cat_name'], ' - ',
    464464                                        'font-style:italic;' ) );
    465   }
    466   else
    467   {
    468     $vtp->setVar( $handle, 'cat_infos.cat_name', $page['title'] );
    469   }
    470   // upload a picture in the category
    471   if ( $page['cat_site_id'] == 1
     465        // upload a picture in the category
     466        if ( $page['cat_site_id'] == 1
    472467       and $conf['upload_available']
    473468       and $page['cat_uploadable'] )
    474   {
    475     $vtp->addSession( $handle, 'upload' );
    476     $url = './upload.php?cat='.$page['cat'].'&expand='.$page['expand'];
    477     $vtp->setVar( $handle, 'upload.url', add_session_id( $url ) );
    478     $vtp->closeSession( $handle, 'upload' );
    479   }
     469        {
     470        $vtp->addSession( $handle, 'upload' );
     471            $url = './upload.php?cat='.$page['cat'].'&expand='.$page['expand'];
     472        $vtp->setVar( $handle, 'upload.url', add_session_id( $url ) );
     473            $vtp->closeSession( $handle, 'upload' );
     474        }
     475  }
     476  else
     477  {
     478    $vtp->setVar( $handle, 'cat_infos.cat_name', $page['title'] );
     479  }
     480 
    480481  $vtp->closeSession( $handle, 'cat_infos' );
    481482}
  • branches/release-1_3/picture.php

    r251 r279  
    235235  $row = mysql_fetch_array( $result );
    236236
    237   if ( $array_cat_directories[$row['storage_category_id']] == '' )
     237  if ( !isset($array_cat_directories[$row['storage_category_id']]) )
    238238  {
    239239    $array_cat_directories[$row['storage_category_id']] =
     
    282282}
    283283
    284 if ( $array_cat_directories[$page['storage_category_id']] == '' )
     284if ( !isset($array_cat_directories[$page['storage_category_id']]) )
    285285{
    286286  $array_cat_directories[$page['storage_category_id']] =
     
    290290
    291291$n = $page['num'] + 1;
    292 $intitule_titre = replace_space( $intitule_cat." - " ).$n.'/'.
     292$intitule_titre = replace_space( $intitule_cat." - " ).$n.'/';
    293293$intitule_titre.= $page['cat_nb_images']."<br />";
    294294if ( $page['name'] != "" )
     
    723723    {
    724724      $vtp->addSession( $handle, 'author_known' );
    725       $vtp->setVar( $handle, 'author_known.value', $user['pseudo'] );
     725          if (isset($user['pseudo']))
     726              $vtp->setVar( $handle, 'author_known.value', $user['pseudo'] );
    726727      $vtp->closeSession( $handle, 'author_known' );
    727728    }
  • branches/release-1_3/profile.php

    r276 r279  
    116116    }
    117117    // redirection
    118     $url = 'category.php?cat='.$page['cat'].'&expand='.$_GET['expand'];
    119     if ( $page['cat'] == 'search' )
    120     {
    121       $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode'];
    122     }
     118    $url = 'category.php';
    123119    if ( $_POST['create_cookie'] != 1 ) $url = add_session_id( $url, true );
    124120    header( 'Request-URI: '.$url ); 
     
    136132templatize_array( $tpl, 'lang', $handle );
    137133//----------------------------------------------------------------- form action
    138 $url = './profile.php?cat='.$page['cat'].'&amp;expand='.$page['expand'];
    139 if ( $page['cat'] == 'search' )
    140 {
    141   $url.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
    142 }
     134$url = './profile.php';
    143135$vtp->setGlobalVar( $handle, 'form_action', add_session_id( $url ) );
    144136//-------------------------------------------------------------- errors display
Note: See TracChangeset for help on using the changeset viewer.