remove code checking since 1.4 not used "file_repository" and "file_store_contents" config vars resulting in not being able to create "files_dir" config

This commit is contained in:
Ralf Becker 2016-06-05 08:58:56 +02:00
parent 2df2beb724
commit 3c3210dba9
2 changed files with 4 additions and 7 deletions

View File

@ -404,14 +404,12 @@ class setup_detection
$config_errors[] = lang("Your temporary directory '%1' %2",$config['temp_dir'],$error_msg);
}
if ((!isset($config['file_repository']) || $config['file_repository'] == 'sql') &&
(!isset($config['file_store_contents']) || $config['file_store_contents'] == 'filesystem') &&
!$this->check_dir($config['files_dir'],$error_msg,true))
if (!$this->check_dir($config['files_dir'],$error_msg,true))
{
$config_errors[] = lang("Your files directory '%1' %2",$config['files_dir'],$error_msg);
}
// set and create the default backup_dir
if (@is_writeable($config['files_dir']) && !$config['backup_dir'] && $config['file_store_contents'] == 'filesystem')
if (@is_writeable($config['files_dir']) && empty($config['backup_dir']))
{
$config['backup_dir'] = $config['files_dir'].'/db_backup';
if (!is_dir($config['backup_dir']) && mkdir($config['backup_dir']))

View File

@ -83,8 +83,7 @@ function temp_dir($settings)
function files_dir($settings)
{
$error_msg = null;
if ($settings['file_repository'] == 'sql' && $settings['file_store_contents'] == 'filesystem' &&
!setup_detection::check_dir($settings['files_dir'],$error_msg,true))
if (!setup_detection::check_dir($settings['files_dir'],$error_msg,true))
{
$GLOBALS['config_error'] = lang("Your files directory '%1' %2",$settings['files_dir'],$error_msg);
}
@ -92,7 +91,7 @@ function files_dir($settings)
function backup_dir(&$settings)
{
if (@is_writeable($settings['files_dir']) && !$settings['backup_dir'] && $settings['file_store_contents'] == 'filesystem')
if (@is_writeable($settings['files_dir']) && empty($settings['backup_dir']))
{
$settings['backup_dir'] = $settings['files_dir'].'/db_backup';
}