/** * action to display the page * @param \Jelix\Castor\Castor $tpl the template container */ function show(\Jelix\Castor\Castor $tpl) { if (!isset($_SESSION['dbprofiles'])) { $this->loadProfiles(); } $sections = $_SESSION['dbprofiles']['profiles']; $data = $_SESSION['dbprofiles']['data']; $ignoreProfiles = isset($this->config['ignoreProfiles']) ? $this->config['ignoreProfiles'] : ''; $ignoreProfiles = preg_split("/ *, */", $ignoreProfiles); if (count($ignoreProfiles)) { $newsections = array(); foreach ($sections as $profile) { if (!in_array(substr($profile, 4), $ignoreProfiles)) { $newsections[] = $profile; } } $tpl->assign('profiles', $newsections); $_SESSION['dbprofiles']['profiles'] = $newsections; } else { $tpl->assign('profiles', $sections); } $tpl->assign($data); //$preferPDO = isset($this->config['preferpdo'])?$this->config['preferpdo']:false; $tpl->assign('drivers', $this->getDriversList()); return true; }
/** * action to display the page * @param \Jelix\Castor\Castor $tpl the template container */ function show(\Jelix\Castor\Castor $tpl) { if (!isset($_SESSION['confmail'])) { $_SESSION['confmail'] = $this->loadconf(); } $tpl->assign($_SESSION['confmail']); return true; }
/** * action to display the page * @param \Jelix\Castor\Castor $tpl the template container */ function show(\Jelix\Castor\Castor $tpl) { if (isset($this->config['level'])) { $level = $this->config['level']; if (!in_array($level, array('error', 'notice', 'warning'))) { $level = 'warning'; } } else { $level = 'warning'; } $reporter = new wizInstallReporter($level, $this); $installer = new \Jelix\Installer\Installer($reporter); $ok = $installer->installApplication(); $tpl->assign('messages', $reporter->messages); $tpl->assign('installok', $ok); return $ok; }