Minahito
minah****@users*****
2006年 5月 15日 (月) 17:33:38 JST
Index: xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.2 Mon May 15 14:26:42 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php Mon May 15 17:33:38 2006 @@ -26,6 +26,21 @@ function _doExecute() { + $handler =& xoops_getmodulehandler('imagecategory'); + $category =& $handler->get($this->mActionForm->get('imgcat_id')); + + if ($category->get('imgcat_storetype') == 'file') { + $this->_storeFile(); + } + else { + $this->_storeDB(); + } + + return parent::_doExecute(); + } + + function _storeFile() + { if ($this->mActionForm->mFormFile != null) { if (!$this->mActionForm->mFormFile->saveAs(XOOPS_UPLOAD_PATH)) { return false; @@ -38,8 +53,11 @@ if ($this->mActionForm->mOldFilename != null) { @unlink(XOOPS_UPLOAD_PATH . "/" . $this->mActionForm->mOldFilename); } + } + + function _storeDB() + { - return parent::_doExecute(); } function executeViewInput(&$controller, &$xoopsUser, &$render)