protected function _prepareTpl() { $lang = jApp::config()->locale; if (!$this->param('no_lang_check')) { $locale = jLocale::getPreferedLocaleFromRequest(); if (!$locale) { $locale = 'en_US'; } jApp::config()->locale = $locale; } $messages = new \Jelix\Installer\Checker\Messages($lang); $reporter = new \Jelix\Installer\Reporter\HtmlBuffer($messages); $check = new \Jelix\Installer\Checker\Checker($reporter, $messages); $check->run(); $this->_tpl->assign('wwwpath', jApp::wwwPath()); $this->_tpl->assign('configpath', jApp::configPath()); $this->_tpl->assign('check', $reporter->trace); }
/** * action to display the page * @param \Jelix\Castor\Castor $tpl the template container */ function show(\Jelix\Castor\Castor $tpl) { $this->tpl = $tpl; $messages = new \Jelix\Installer\Checker\Messages(); $check = new \Jelix\Installer\Checker\Checker($this, $messages); if (isset($this->config['verbose'])) { $check->verbose = !!$this->config['verbose']; } if (isset($this->config['databases'])) { $db = explode(',', trim($this->config['databases'])); $check->addDatabaseCheck($db, true); } if (isset($this->config['pathcheck'])) { if (is_string($this->config['pathcheck'])) { $files = explode(',', trim($this->config['pathcheck'])); } else { $files = $this->config['pathcheck']; } $check->addWritablePathCheck($files); } $check->checkForInstallation = true; $check->run(); return $check->nbError == 0; }