Simplification

This commit is contained in:
Michael RICOIS 2014-11-26 20:11:01 +00:00
parent 5f38dcf1f9
commit 15cd1ca656
2 changed files with 12 additions and 28 deletions

View File

@ -91,34 +91,18 @@ if ($opts->install)
$c = new Zend_Config($application->getOptions());
//Create data directory and all his children
if ( !file_exists(APPLICATION_PATH.'/../data') )
{
mkdir(APPLICATION_PATH.'/../data');
}
if ( !file_exists(APPLICATION_PATH.'/../data/cache') )
{
mkdir(APPLICATION_PATH.'/../data/cache');
}
if ( !file_exists(APPLICATION_PATH.'/../data/cache') )
{
mkdir(APPLICATION_PATH.'/../data/log');
}
if ( !file_exists(APPLICATION_PATH.'/../data/files') )
{
mkdir(APPLICATION_PATH.'/../data/files');
}
if ( !file_exists(APPLICATION_PATH.'/../data/sessions') )
{
mkdir(APPLICATION_PATH.'/../data/sessions');
}
if ( !file_exists(APPLICATION_PATH.'/../data/wdsl') )
{
mkdir(APPLICATION_PATH.'/../data/wsdl');
$dirToCreate = array(
APPLICATION_PATH.'/../data',
APPLICATION_PATH.'/../data/cache',
APPLICATION_PATH.'/../data/log',
APPLICATION_PATH.'/../data/files',
APPLICATION_PATH.'/../data/sessions',
APPLICATION_PATH.'/../data/wsdl',
);
foreach ($dirToCreate as $dir) {
if ( !file_exists($dir) ) {
mkdir($dir);
}
}
// Generate cache file