From 908a78d2b45bdc501c481b56b53996f7c7fd1aaa Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 16 Jan 2005 17:26:36 +0000 Subject: - bug fixed : when unvalidating a waiting picture, a wrong path was unlinked git-svn-id: http://piwigo.org/svn/trunk@696 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/waiting.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/admin/waiting.php b/admin/waiting.php index df6f74076..2d6fa9aac 100644 --- a/admin/waiting.php +++ b/admin/waiting.php @@ -26,7 +26,7 @@ // +-----------------------------------------------------------------------+ if( !defined("PHPWG_ROOT_PATH") ) { - die ("Hacking attempt!"); + die ("Hacking attempt!"); } include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php'); //--------------------------------------------------------------------- updates @@ -49,8 +49,6 @@ if ( isset( $_POST['submit'] ) ) $query.= ' WHERE id = '.$row['id']; $query.= ';'; pwg_query( $query ); - // linking logically the picture to its storage category - $query = 'INSERT INTO'; } else { @@ -62,13 +60,13 @@ if ( isset( $_POST['submit'] ) ) pwg_query( $query ); // deletion of the associated files $dir = get_complete_dir( $row['storage_category_id'] ); - unlink( '.'.$dir.$row['file'] ); - if ( $row['tn_ext'] != '' ) + unlink( $dir.$row['file'] ); + if (isset($row['tn_ext']) and $row['tn_ext'] != '' ) { $thumbnail = $conf['prefix_thumbnail']; $thumbnail.= get_filename_wo_extension( $row['file'] ); $thumbnail.= '.'.$row['tn_ext']; - $url = PHPWG_ROOT_PATH.$dir.'thumbnail/'.$thumbnail; + $url = $dir.'thumbnail/'.$thumbnail; unlink( $url ); } } -- cgit v1.2.3