25 public $mActionForm =
null;
27 public function prepare(&$controller, &$xoopsUser)
29 $this->_setupActionForm();
32 public function _setupActionForm()
36 public function getDefaultView(&$controller, &$xoopsUser)
38 $dirname = trim(xoops_getrequest(
'dirname'));
42 $this->mModuleObject =& $installer->loadModuleObject($dirname);
44 if (!is_object($this->mModuleObject)) {
45 $this->mLog =& $installer->getLog();
46 return LEGACY_FRAME_VIEW_ERROR;
49 $this->mActionForm->load($this->mModuleObject);
51 $this->mModuleObject->loadAdminMenu();
52 $this->mModuleObject->loadInfo($dirname);
54 return LEGACY_FRAME_VIEW_INDEX;
57 public function execute(&$controller, &$xoopsUser)
59 if (isset($_REQUEST[
'_form_control_cancel'])) {
60 return LEGACY_FRAME_VIEW_CANCEL;
63 $this->mActionForm->fetch();
64 $this->mActionForm->validate();
66 $installer =& $this->
_getInstaller($this->mActionForm->get(
'dirname'));
67 $this->mModuleObject =& $installer->loadModuleObject($this->mActionForm->get(
'dirname'));
69 if ($installer->hasAgree()) {
70 $this->_loadAgreement();
73 if ($this->mActionForm->hasError()) {
78 if ($installer->hasAgree()) {
79 return LEGACY_FRAME_VIEW_INPUT;
81 return LEGACY_FRAME_VIEW_INDEX;
85 if (!is_object($this->mModuleObject)) {
86 return LEGACY_FRAME_VIEW_ERROR;
89 $installer->setForceMode($this->mActionForm->get(
'force'));
90 $installer->execute($this->mActionForm->get(
'dirname'));
92 $this->mLog =& $installer->getLog();
94 return LEGACY_FRAME_VIEW_SUCCESS;
105 public function _loadAgreement()
109 public function executeViewError(&$controller, &$xoopsUser, &$renderer)
111 $renderer->setTemplateName(
'install_wizard_error.html');
112 $renderer->setAttribute(
'log', $this->mLog);