[geeklog-cvs] geeklog: Move check for mysqli.class.php to the install script a...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Jun 14 06:13:21 EDT 2011
changeset 8315:1b18e6866b33
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/1b18e6866b33
user: Dirk Haun <dirk at haun-online.de>
date: Mon Jun 13 18:28:50 2011 +0200
description:
Move check for mysqli.class.php to the install script and raise min. required MySQL version to 4.1.3
diffstat:
public_html/admin/install/lib-install.php | 10 +++++++++-
system/lib-database.php | 3 +--
2 files changed, 10 insertions(+), 3 deletions(-)
diffs (40 lines):
diff -r 294e17559414 -r 1b18e6866b33 public_html/admin/install/lib-install.php
--- a/public_html/admin/install/lib-install.php Mon Jun 13 17:35:50 2011 +0200
+++ b/public_html/admin/install/lib-install.php Mon Jun 13 18:28:50 2011 +0200
@@ -65,7 +65,7 @@
define('SUPPORTED_PHP_VER', '5.2.0');
}
if (!defined('SUPPORTED_MYSQL_VER')) {
- define('SUPPORTED_MYSQL_VER', '4.0.18');
+ define('SUPPORTED_MYSQL_VER', '4.1.3');
}
$_REQUEST = array_merge($_GET, $_POST);
@@ -1257,6 +1257,14 @@
if (file_exists($gl_path . '/sql/' . $prefix . '_tableanddata.php') &&
file_exists($gl_path . '/system/databases/' . $prefix
. '.class.php')) {
+ if ($prefix == 'mysql') {
+ // check that the MySQLi driver file is also there so we
+ // don't have to check for it every time at runtime
+ if (! file_exists($gl_path . '/system/databases/'
+ . 'mysqli.class.php')) {
+ continue;
+ }
+ }
$retval .= '<option value="' . $dbname . '"';
if (! function_exists($info['fn'])) {
$retval .= ' disabled="disabled"';
diff -r 294e17559414 -r 1b18e6866b33 system/lib-database.php
--- a/system/lib-database.php Mon Jun 13 17:35:50 2011 +0200
+++ b/system/lib-database.php Mon Jun 13 18:28:50 2011 +0200
@@ -129,8 +129,7 @@
* Include appropriate DBMS object
*
*/
-if (($_DB_dbms === 'mysql') AND class_exists('MySQLi') AND
- file_exists($_CONF['path_system'] . 'databases/mysqli.class.php')) {
+if (($_DB_dbms === 'mysql') AND class_exists('MySQLi')) {
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