diff options
author | plegall <plg@piwigo.org> | 2005-01-16 17:26:36 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-01-16 17:26:36 +0000 |
commit | 908a78d2b45bdc501c481b56b53996f7c7fd1aaa (patch) | |
tree | 4fd168f192969f56fde33968fe2fccd5c165959b | |
parent | d5c2a2eda88f89bd3ed40523283fd601e90216ab (diff) |
- 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
Diffstat (limited to '')
-rw-r--r-- | admin/waiting.php | 10 |
1 files 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 ); } } |