Minahito
minah****@users*****
2006年 8月 4日 (金) 19:55:01 JST
Index: xoops2jp/html/modules/base/class/image.php diff -u xoops2jp/html/modules/base/class/image.php:1.1.2.4 xoops2jp/html/modules/base/class/image.php:1.1.2.5 --- xoops2jp/html/modules/base/class/image.php:1.1.2.4 Tue May 30 12:55:26 2006 +++ xoops2jp/html/modules/base/class/image.php Fri Aug 4 19:55:01 2006 @@ -79,14 +79,18 @@ */ function delete(&$obj, $force = false) { + $obj->loadImagebody(); + if (parent::delete($obj, $force)) { $filepath = XOOPS_UPLOAD_PATH . "/" . $obj->get('image_name'); if (file_exists($filepath)) { @unlink($filepath); } - $handler =& xoops_gethandler('imagebody', 'base'); - $handler->delete($this->get('image_id')); + if (is_object($obj->mImageBody)) { + $handler =& xoops_getmodulehandler('imagebody', 'base'); + $handler->delete($obj->mImageBody, $force); + } return true; }