#716394 by boombatower: SimpleTest should respect table prefixes.

merge-requests/26/head
Angie Byron 2010-03-07 08:08:37 +00:00
parent 7bc4ca4fda
commit b04816e0fe
1 changed files with 2 additions and 1 deletions

View File

@ -1540,7 +1540,8 @@ abstract class Database {
// and we put that in the user_agent header. The header HMAC was already
// validated in bootstrap.inc.
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^(simpletest\d+);/", $_SERVER['HTTP_USER_AGENT'], $matches)) {
$db_prefix .= $matches[1];
$db_prefix_string = is_array($db_prefix) ? $db_prefix['default'] : $db_prefix;
$db_prefix = $db_prefix_string . $matches[1];
}
return $new_connection;
}