From b3e8734a490084d1cb05af97b50748e777663a07 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 14 Jul 2013 16:35:04 -0400 Subject: [ticket/11700] Load the dbms with namespaces PHPBB3-11700 --- phpBB/includes/functions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 174ba712ba..f0681c9687 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5647,24 +5647,24 @@ function phpbb_convert_30_dbms_to_31($dbms) // true for mysqli class. // However, per the docblock any valid 3.1 driver name should be // recognized by this function, and have priority over 3.0 dbms. - if (class_exists('phpbb_db_driver_' . $dbms)) + if (class_exists('\phpbb\db\driver\\' . $dbms)) { - return 'phpbb_db_driver_' . $dbms; + return '\phpbb\db\driver\\' . $dbms; } if (class_exists($dbms)) { - // Additionally we could check that $dbms extends phpbb_db_driver. + // Additionally we could check that $dbms extends phpbb\db\driver\driver. // http://php.net/manual/en/class.reflectionclass.php // Beware of possible performance issues: // http://stackoverflow.com/questions/294582/php-5-reflection-api-performance // We could check for interface implementation in all paths or - // only when we do not prepend phpbb_db_driver_. + // only when we do not prepend phpbb\db\driver\. /* $reflection = new \ReflectionClass($dbms); - if ($reflection->isSubclassOf('phpbb_db_driver')) + if ($reflection->isSubclassOf('phpbb\db\driver\driver')) { return $dbms; } -- cgit v1.2.1