1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-28 05:55:32 +02:00

Fixed bug #120, stripslashes in config table from 1.x and fixed parse error

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3217 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Bart van Bragt
2002-12-20 14:04:59 +00:00
parent d98cd83286
commit bfc7f0c2ce

View File

@ -39,7 +39,7 @@ if ( !defined('INSTALLING') )
if( defined("PHPBB_INSTALLED") )
{
redirect("../index.$phpEx);
redirect("../index.$phpEx");
}
}
@ -565,9 +565,11 @@ if ( !empty($next) )
if ( !inarray($name, $ignore_configs) )
{
$name = ( !empty($rename_configs[$name]) ) ? $rename_configs[$name] : $name;
// phpBB 1.x has some problems with escaping strings in the database. Try to correct for
// this by removing all slashes and then escaping once.
$sql = "REPLACE INTO " . CONFIG_TABLE . " (config_name, config_value)
VALUES ('$name', '" . stripslashes($value) . "')";
VALUES ('$name', '".addslashes(stripslashes(stripslashes($value)))."')";
query($sql, "Couldn't update config table with values from old config table");
}
}