1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 01:36:57 +02:00

Merge r10473 into the 3.0.7 branch.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_7@10476 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Josh Woody
2010-02-04 01:07:30 +00:00
parent dec3e2f728
commit 4a17abbcc4
3 changed files with 27 additions and 3 deletions

View File

@@ -1232,6 +1232,11 @@ function get_config()
$convert->p_master->error($user->lang['FILE_NOT_FOUND'] . ': ' . $filename, __LINE__, __FILE__);
}
if (isset($convert->config_schema['array_name']))
{
unset($convert->config_schema['array_name']);
}
$convert_config = extract_variables_from_file($filename);
if (!empty($convert->config_schema['array_name']))
{
@@ -1264,6 +1269,7 @@ function restore_config($schema)
global $db, $config;
$convert_config = get_config();
foreach ($schema['settings'] as $config_name => $src)
{
if (preg_match('/(.*)\((.*)\)/', $src, $m))
@@ -1274,8 +1280,16 @@ function restore_config($schema)
}
else
{
$config_value = (isset($convert_config[$src])) ? $convert_config[$src] : '';
}
if ($schema['table_format'] != 'file' || empty($schema['array_name']))
{
$config_value = (isset($convert_config[$src])) ? $convert_config[$src] : '';
}
else if (!empty($schema['array_name']))
{
$src_ary = $schema['array_name'];
$config_value = (isset($convert_config[$src_ary][$src])) ? $convert_config[$src_ary][$src] : '';
}
}
if ($config_value !== '')
{