[*] Installer : installer improvements - Step 1

This commit is contained in:
Damien Metzger
2013-02-21 11:05:47 +01:00
parent d4fbe4a417
commit 6a155d8762
13 changed files with 59 additions and 149 deletions
+20 -13
View File
@@ -71,7 +71,6 @@ class InstallControllerHttpSystem extends InstallControllerHttp
{
if (!isset($this->tests['required']))
$this->tests['required'] = $this->model_system->checkRequiredTests();
if (!isset($this->tests['optional']))
$this->tests['optional'] = $this->model_system->checkOptionalTests();
@@ -80,16 +79,18 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'required' => array(
array(
'title' => $this->l('PHP parameters:'),
'success' => 1,
'checks' => array(
'phpversion' => $this->l('Is PHP 5.1.2 or later installed ?'),
'upload' => $this->l('Can upload files ?'),
'system' => $this->l('Can create new files and folders ?'),
'gd' => $this->l('Is GD Library installed ?'),
'mysql_support' => $this->l('Is MySQL support is on ?'),
'phpversion' => $this->l('PHP 5.1.2 or later is not enabled'),
'upload' => $this->l('Cannot upload files'),
'system' => $this->l('Cannot create new files and folders'),
'gd' => $this->l('GD Library is not installed'),
'mysql_support' => $this->l('MySQL support is not activated'),
)
),
array(
'title' => $this->l('Recursive write permissions on files and folders:'),
'success' => 1,
'checks' => array(
'config_dir' => '~/config/',
'cache_dir' => '~/cache/',
@@ -110,19 +111,25 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'optional' => array(
array(
'title' => $this->l('PHP parameters:'),
'success' => $this->tests['optional']['success'],
'checks' => array(
'fopen' => $this->l('Can open external URLs ?'),
'register_globals' => $this->l('Is PHP register global option off (recommended) ?'),
'gz' => $this->l('Is GZIP compression activated (recommended) ?'),
'mcrypt' => $this->l('Is Mcrypt extension available (recommended) ?'),
'magicquotes' => $this->l('Is PHP magic quotes option deactivated (recommended) ?'),
'dom' => $this->l('Is Dom extension loaded ?'),
'pdo_mysql' => $this->l('Is PDO MySQL extension loaded ?'),
'fopen' => $this->l('Cannot open external URLs'),
'register_globals' => $this->l('PHP register global option is on'),
'gz' => $this->l('GZIP compression is not activated'),
'mcrypt' => $this->l('Mcrypt extension is not enabled'),
'magicquotes' => $this->l('PHP magic quotes option is enabled'),
'dom' => $this->l('Dom extension is not loaded'),
'pdo_mysql' => $this->l('PDO MySQL extension is not loaded'),
)
),
),
);
foreach ($this->tests_render['required'] as &$category)
foreach ($category['checks'] as $id => $check)
if ($this->tests['required']['checks'][$id] != 'ok')
$category['success'] = 0;
// If required tests failed, disable next button
if (!$this->tests['required']['success'])
$this->next_button = false;