21 public function _getId()
23 return isset($_REQUEST[
'id']) ? xoops_getrequest(
'id') : 0;
26 public function &_getHandler()
28 $handler =& xoops_getmodulehandler(
'smiles');
32 public function _setupActionForm()
35 $this->mActionForm->prepare();
39 public function _doExecute()
41 if (
null !== $this->mActionForm->mFormFile) {
42 if (!$this->mActionForm->mFormFile->saveAs(XOOPS_UPLOAD_PATH)) {
50 if (
null !== $this->mActionForm->mOldFilename &&
'blank.gif' != $this->mActionForm->mOldFilename) {
51 @unlink(XOOPS_UPLOAD_PATH .
'/' . $this->mActionForm->mOldFilename);
54 return parent::_doExecute();
57 public function executeViewInput(&$controller, &$xoopsUser, &$render)
59 $render->setTemplateName(
'smiles_edit.html');
60 $render->setAttribute(
'actionForm', $this->mActionForm);
61 $render->setAttribute(
'object', $this->mObject);
64 public function executeViewSuccess(&$controller, &$xoopsUser, &$render)
66 $controller->executeForward(
'./index.php?action=SmilesList');
69 public function executeViewError(&$controller, &$xoopsUser, &$render)
71 $controller->executeRedirect(
'./index.php?action=SmilesList', 1, _MD_LEGACY_ERROR_DBUPDATE_FAILED);
74 public function executeViewCancel(&$controller, &$xoopsUser, &$render)
76 $controller->executeForward(
'./index.php?action=SmilesList');