protected function _prepareTpl()
 {
     $lang = jApp::config()->locale;
     if (!$this->getParam('no_lang_check')) {
         $locale = jLocale::getPreferedLocaleFromRequest();
         if (!$locale) {
             $locale = 'en_US';
         }
         jApp::config()->locale = $locale;
     }
     $reporter = new checkZoneInstallReporter();
     $check = new jInstallCheck($reporter, $lang);
     $reporter->messageProvider = $check->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 jTpl $tpl the template container
  */
 function show($tpl)
 {
     $this->tpl = $tpl;
     $check = new jInstallCheck($this);
     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;
 }
echo htmlspecialchars($check->messages->get('checker.title'));
?>
</title>

    <style type="text/css">
    body {font-family: verdana, sans-serif;}

    ul.checkresults {
        border:3px solid black;
        margin: 2em;
        padding:1em;
        list-style-type:none;
    }
    ul.checkresults li { margin:0; padding:5px; border-top:1px solid black; }
    li.checkerror   { background-color:#ff6666;}
    li.checkok      { background-color:#a4ffa9;}
    li.checkwarning { background-color:#ffbc8f;}
    </style>

</head><body >
    <h1><?php 
echo htmlspecialchars($check->messages->get('checker.title'));
?>
</h1>

<?php 
$check->run();
?>
</body>
</html>
 protected function _prepareTpl()
 {
     $lang = $GLOBALS['gJConfig']->locale;
     if (!$this->getParam('no_lang_check')) {
         $languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
         foreach ($languages as $bl) {
             if (preg_match("/^([a-zA-Z]{2})(?:[-_]([a-zA-Z]{2}))?(;q=[0-9]\\.[0-9])?\$/", $bl, $match)) {
                 if (isset($match[2])) {
                     $lang = strtolower($match[1]) . '_' . strtoupper($match[2]);
                 } else {
                     $lang = strtolower($match[1]) . '_' . strtoupper($match[1]);
                 }
                 break;
             }
         }
         if ($lang != 'fr_FR' && $lang != 'en_EN' && $lang != 'en_US') {
             $lang = 'en_EN';
         }
         $GLOBALS['gJConfig']->locale = $lang;
     }
     $reporter = new checkZoneInstallReporter();
     $check = new jInstallCheck($reporter, $lang);
     $check->run();
     $this->_tpl->assign('wwwpath', JELIX_APP_WWW_PATH);
     $this->_tpl->assign('configpath', JELIX_APP_CONFIG_PATH);
     $this->_tpl->assign('check', $reporter->trace);
 }