Changeset 311 for branches


Ignore:
Timestamp:
Jan 22, 2004, 12:33:56 AM (21 years ago)
Author:
z0rglub
Message:

Php warnings correction

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

Legend:

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

    r276 r311  
    3737    $subrow = mysql_fetch_array( $subresult );
    3838
    39     if ( $array_cat_directories[$subrow['cat_id']] == '' )
     39    if ( !isset( $array_cat_directories[$subrow['cat_id']] ) )
    4040    {
    4141      $array_cat_directories[$subrow['cat_id']] =
  • branches/release-1_3/admin/include/functions.php

    r306 r311  
    405405    // if the category has no representative picture (ie
    406406    // representative_picture_id == NULL) we don't update anything
    407     if ( $row['representative_picture_id'] != '' )
     407    if ( isset( $row['representative_picture_id'] ) )
    408408    {
    409409      $query = 'SELECT image_id';
     
    692692  $uppercat = $page['plain_structure'][$category_id]['id_uppercat'];
    693693
    694   while ( $uppercat != '' )
     694  while ( $uppercat != 'NULL' )
    695695  {
    696696    array_push( $uppercats, $uppercat );
  • branches/release-1_3/admin/infos_images.php

    r308 r311  
    180180      while ( $row = mysql_fetch_array( $result ) )
    181181      {
    182         $specific_keywords = explode( ',', $row['keywords'] );
     182        if ( !isset( $row['keywords'] ) ) $specific_keywords = array();
     183        else $specific_keywords = explode( ',', $row['keywords'] );
     184       
    183185        $common_keywords   = get_keywords( $_POST['keywords_cat'] );
    184186        // first possiblity : adding the given keywords to all the pictures
  • branches/release-1_3/admin/picture_modify.php

    r279 r311  
    9696    // if the user ask this picture to be not any more the representative,
    9797    // we have to set the representative_picture_id of this category to NULL
    98     else if ( $row['representative_picture_id'] == $_GET['image_id'] )
     98    else if ( isset( $row['representative_picture_id'] )
     99              and $row['representative_picture_id'] == $_GET['image_id'] )
    99100    {
    100101      $query = 'UPDATE '.PREFIX_TABLE.'categories';
     
    187188$vtp->setVar( $sub, 'form_action', $action );
    188189// retrieving direct information about picture
    189 $query = 'SELECT file,date_available,date_creation,tn_ext,name,filesize';
    190 $query.= ',width,height,author,comment,keywords,storage_category_id';
     190$infos = array( 'file','date_available','date_creation','tn_ext','name'
     191                ,'filesize','width','height','author','comment','keywords'
     192                ,'storage_category_id' );
     193$query = 'SELECT '. implode( ',', $infos );
    191194$query.= ' FROM '.PREFIX_TABLE.'images';
    192195$query.= ' WHERE id = '.$_GET['image_id'];
    193196$query.= ';';
    194197$row = mysql_fetch_array( mysql_query( $query ) );
     198
     199foreach ( $infos as $info ) {
     200  if ( !isset( $row[$info] ) ) $row[$info] = '';
     201}
     202
    195203// picture title
    196204if ( $row['name'] == '' )
     
    315323  }
    316324
    317   if ( $row['representative_picture_id'] == $_GET['image_id'] )
     325  if ( isset( $row['representative_picture_id'] )
     326       and $row['representative_picture_id'] == $_GET['image_id'] )
    318327  {
    319328    $vtp->setVar( $sub, 'linked_category.representative_checked',
  • branches/release-1_3/admin/user_list.php

    r304 r311  
    5959  $row = mysql_fetch_array( mysql_query( $query ) );
    6060  // confirm user deletion ?
    61   if ( $_GET['confirm'] != 1 )
     61  if ( !isset( $_GET['confirm'] ) )
    6262  {
    6363    $vtp->addSession( $sub, 'deletion' );
  • branches/release-1_3/category.php

    r292 r311  
    286286    $file = get_filename_wo_extension( $row['file'] );
    287287    // name of the picture
    288     if ( $row['name'] != '' ) $name = $row['name'];
    289     else                      $name = str_replace( '_', ' ', $file );
     288    if ( isset( $row['name'] ) and $row['name'] != '' ) $name = $row['name'];
     289    else $name = str_replace( '_', ' ', $file );
    290290
    291291    if ( $page['cat'] == 'search' )
Note: See TracChangeset for help on using the changeset viewer.