aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_convert.php
diff options
context:
space:
mode:
authorJosh Woody <a_jelly_doughnut@phpbb.com>2010-02-04 00:40:19 +0000
committerJosh Woody <a_jelly_doughnut@phpbb.com>2010-02-04 00:40:19 +0000
commit99c608e88c267e0fa7517da196e1701ba163c26a (patch)
tree5879f8f2f926fe2534ab326cdba7e4c4e31aa529 /phpBB/includes/functions_convert.php
parent63be6762f3e4a10af371011c95ef8c3f46645049 (diff)
downloadforums-99c608e88c267e0fa7517da196e1701ba163c26a.tar
forums-99c608e88c267e0fa7517da196e1701ba163c26a.tar.gz
forums-99c608e88c267e0fa7517da196e1701ba163c26a.tar.bz2
forums-99c608e88c267e0fa7517da196e1701ba163c26a.tar.xz
forums-99c608e88c267e0fa7517da196e1701ba163c26a.zip
Bug #57265 - Convertors cannot read configuration files
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10473 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_convert.php')
-rw-r--r--phpBB/includes/functions_convert.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 82ec114c09..8a1d07c8e5 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -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 !== '')
{