diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:09:11 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:09:11 +0100 |
| commit | 35a62ed0085df6d767f38d6fbd0e02b8f0fbfc40 (patch) | |
| tree | 098e3b3e043f6c3e31c9c922287f76e5ec726e03 /phpBB/includes/functions_convert.php | |
| parent | 3b46681652ad0c235ccdcafc449c3d759335df17 (diff) | |
| parent | 05b5dc316779f67641e17859d5c69f296b24288d (diff) | |
| download | forums-35a62ed0085df6d767f38d6fbd0e02b8f0fbfc40.tar forums-35a62ed0085df6d767f38d6fbd0e02b8f0fbfc40.tar.gz forums-35a62ed0085df6d767f38d6fbd0e02b8f0fbfc40.tar.bz2 forums-35a62ed0085df6d767f38d6fbd0e02b8f0fbfc40.tar.xz forums-35a62ed0085df6d767f38d6fbd0e02b8f0fbfc40.zip | |
Merge commit 'release-3.0.7-RC2'
Diffstat (limited to 'phpBB/includes/functions_convert.php')
| -rw-r--r-- | phpBB/includes/functions_convert.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 82ec114c09..048212bcfe 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -205,10 +205,12 @@ function get_group_id($group_name) /** * Generate the email hash stored in the users table +* +* Note: Deprecated, calls should directly go to phpbb_email_hash() */ function gen_email_hash($email) { - return (crc32(strtolower($email)) . strlen($email)); + return phpbb_email_hash($email); } /** @@ -1232,6 +1234,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 +1271,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 +1282,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 !== '') { |
