Changeset 696


Ignore:
Timestamp:
Jan 16, 2005, 6:26:36 PM (20 years ago)
Author:
plg
Message:
  • bug fixed : when unvalidating a waiting picture, a wrong path was unlinked
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/waiting.php

    r675 r696  
    2727if( !defined("PHPWG_ROOT_PATH") )
    2828{
    29         die ("Hacking attempt!");
     29  die ("Hacking attempt!");
    3030}
    3131include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php');
     
    5050        $query.= ';';
    5151        pwg_query( $query );
    52         // linking logically the picture to its storage category
    53         $query = 'INSERT INTO';
    5452      }
    5553      else
     
    6361        // deletion of the associated files
    6462        $dir = get_complete_dir( $row['storage_category_id'] );
    65         unlink( '.'.$dir.$row['file'] );
    66         if ( $row['tn_ext'] != '' )
     63        unlink( $dir.$row['file'] );
     64        if (isset($row['tn_ext']) and $row['tn_ext'] != '' )
    6765        {
    6866          $thumbnail = $conf['prefix_thumbnail'];
    6967          $thumbnail.= get_filename_wo_extension( $row['file'] );
    7068          $thumbnail.= '.'.$row['tn_ext'];
    71           $url = PHPWG_ROOT_PATH.$dir.'thumbnail/'.$thumbnail;
     69          $url = $dir.'thumbnail/'.$thumbnail;
    7270          unlink( $url );
    7371        }
Note: See TracChangeset for help on using the changeset viewer.