Index: branches/5.0.x/core/units/images/images.php =================================================================== diff -u -r12117 -r12299 --- branches/5.0.x/core/units/images/images.php (.../images.php) (revision 12117) +++ branches/5.0.x/core/units/images/images.php (.../images.php) (revision 12299) @@ -1,6 +1,6 @@ Load($id); - $local_path = FULL_PATH.$this->GetDBField('LocalPath'); - $thumb_path = FULL_PATH.$this->GetDBField('ThumbPath'); - if(file_exists($local_path)) + class ImagesItem extends kDBItem { + + function Delete($id) { - unlink($local_path); + $this->Load($id); + $local_path = FULL_PATH.$this->GetDBField('LocalPath'); + $thumb_path = FULL_PATH.$this->GetDBField('ThumbPath'); + if(file_exists($local_path)) + { + unlink($local_path); + } + if(file_exists($thumb_path)) + { + unlink($thumb_path); + } + return parent::Delete($id); } - if(file_exists($thumb_path)) - { - unlink($thumb_path); - } - return parent::Delete($id); - } -} - -?> \ No newline at end of file + } \ No newline at end of file