1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 13:30:25 +02:00

[ticket/11015] Move db driver class name fixing to function

PHPBB3-11015
This commit is contained in:
Igor Wiedler
2012-11-17 00:24:32 +01:00
parent 8f8a7f7637
commit 5bc0f4b3d4
7 changed files with 33 additions and 35 deletions

View File

@@ -5412,3 +5412,19 @@ function phpbb_to_numeric($input)
{
return ($input > PHP_INT_MAX) ? (float) $input : (int) $input;
}
/**
* Convert 3.0 dbms to 3.1 db driver class name
*
* @param string $dbms dbms parameter
* @return db driver class
*/
function phpbb_convert_30_dbms_to_31($dbms)
{
if (!preg_match('#^phpbb_db_driver_#', $dbms))
{
return 'phpbb_db_driver_'.$dbms;
}
return $dbms;
}