[geeklog-cvs] geeklog: Checking for the MySQLi class is about four times faste...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Jun 14 06:13:19 EDT 2011


changeset 8314:294e17559414
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/294e17559414
user: Dirk Haun <dirk at haun-online.de>
date: Mon Jun 13 17:35:50 2011 +0200
description:
Checking for the MySQLi class is about four times faster than checking for the MySQLi extension

diffstat:

 system/lib-database.php |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 4bf2b5890d9b -r 294e17559414 system/lib-database.php
--- a/system/lib-database.php	Mon Jun 13 16:40:59 2011 +0200
+++ b/system/lib-database.php	Mon Jun 13 17:35:50 2011 +0200
@@ -129,8 +129,8 @@
 * Include appropriate DBMS object
 *
 */
-if (($_DB_dbms === 'mysql') AND in_array('mysqli', get_loaded_extensions())
-        AND file_exists($_CONF['path_system'] . 'databases/mysqli.class.php')) {
+if (($_DB_dbms === 'mysql') AND class_exists('MySQLi') AND
+        file_exists($_CONF['path_system'] . 'databases/mysqli.class.php')) {
     require_once $_CONF['path_system'] . 'databases/mysqli.class.php';
 } else {
     require_once $_CONF['path_system'] . 'databases/'. $_DB_dbms . '.class.php';



More information about the geeklog-cvs mailing list