/** * Controller-Processing * @return boolean */ public function process() { if (!parent::process()) { return false; } $this->view->setViewJsFiles(array(\fpcm\classes\baseconfig::$jsPath . 'moduleinstaller.js')); $tempFile = new \fpcm\model\files\tempfile('installkeys'); if (!$tempFile->getContent()) { trigger_error('No module key data found!'); $this->view->addErrorMessage('MODULES_FAILED_TEMPKEYS'); $this->view->assign('nokeys', true); $this->view->render(); return false; } $startStep = $this->forceStep ? $this->forceStep : (\fpcm\classes\baseconfig::canConnect() ? 1 : 4); $keys = json_decode($tempFile->getContent(), true); $params = $this->initPkgManagerData(); $params['fpcmModuleKeys'] = $keys; $params['fpcmModuleUrl'] = \fpcm\classes\baseconfig::$moduleServer . 'packages/{{pkgkey}}.zip'; $params['fpcmUpdaterStartStep'] = $this->forceStep ? $this->forceStep : (\fpcm\classes\baseconfig::canConnect() ? 1 : 4); $params['fpcmProgressbarMax'] = count($keys); $params['fpcmUpdaterMessages']['EXIT_1'] = $this->lang->translate('MODULES_SUCCESS_INSTALL'); $params['fpcmUpdaterMessages']['4_0'] = $this->lang->translate('MODULES_FAILED_INSTALL'); $this->view->addJsVars($params); $this->view->render(); $tempFile->delete(); }