diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-11-17 00:24:32 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-11-17 00:24:32 +0100 |
commit | 5bc0f4b3d49ed1bea45464beece42906646eb026 (patch) | |
tree | 947a9f33ad697d821798c042adf28aa8972340c9 /phpBB/includes/functions.php | |
parent | 8f8a7f76374679d2f893245c1f607a3b2db56a9a (diff) | |
download | forums-5bc0f4b3d49ed1bea45464beece42906646eb026.tar forums-5bc0f4b3d49ed1bea45464beece42906646eb026.tar.gz forums-5bc0f4b3d49ed1bea45464beece42906646eb026.tar.bz2 forums-5bc0f4b3d49ed1bea45464beece42906646eb026.tar.xz forums-5bc0f4b3d49ed1bea45464beece42906646eb026.zip |
[ticket/11015] Move db driver class name fixing to function
PHPBB3-11015
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 804d89d1a2..045a28672b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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; +} |