function _doExecute() { $handler =& xoops_getmodulehandler('imagecategory', 'legacy'); $category =& $handler->get($this->mActionForm->get('imgcat_id')); // // [TODO] // Should the following procedure be after parent::_doExecute()? // if ($category->get('imgcat_storetype') == 'file') { $this->_storeFile(); } else { $this->_storeDB(); } return parent::_doExecute(); }
function _doExecute() { if ($this->mActionForm->mFormFile != null) { if (!$this->mActionForm->mFormFile->saveAs(XOOPS_UPLOAD_PATH)) { return false; } } // // Delete old file, if the file exists. // if ($this->mActionForm->mOldFilename != null && $this->mActionForm->mOldFilename != "blank.gif") { @unlink(XOOPS_UPLOAD_PATH . "/" . $this->mActionForm->mOldFilename); } return parent::_doExecute(); }