[*] Installer : added file check in order to check if everyhting has been successfuly uploaded

This commit is contained in:
Damien Metzger
2013-09-20 11:09:06 +02:00
parent 4f639329e9
commit 1cebd5920e
2 changed files with 26 additions and 1 deletions

View File

@@ -58,7 +58,8 @@ class ConfigurationTestCore
'theme_cache_dir' => 'themes/'._THEME_NAME_.'/cache/',
'translations_dir' => 'translations',
'customizable_products_dir' => 'upload',
'virtual_products_dir' => 'download'
'virtual_products_dir' => 'download',
'files' => false
);
}
@@ -318,4 +319,21 @@ class ConfigurationTestCore
{
return extension_loaded('Dom');
}
public static function test_files()
{
$files = array(
'/cache/smarty/compile/index.php',
'/classes/log/index.php',
'/classes/cache/index.php',
'/config/index.php',
'/tools/tar/Archive_Tar.php',
'/tools/pear/PEAR.php',
'/index.php'
);
foreach ($files as $file)
if (!file_exists(rtrim(_PS_ROOT_DIR_, DIRECTORY_SEPARATOR).str_replace('/', DIRECTORY_SEPARATOR, $file)))
return false;
return true;
}
}

View File

@@ -88,6 +88,13 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'mysql_support' => $this->l('MySQL support is not activated')
)
),
array(
'title' => $this->l('Files'),
'success' => 1,
'checks' => array(
'files' => $this->l('All files are not successfuly uploaded on your server')
)
),
array(
'title' => $this->l('Recursive write permissions on files and folders:'),
'success' => 1,