[geeklog-cvs] geeklog: Workaround for the problems with the PHP version that A...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Sep 10 13:19:57 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d02e2d7d9d24
changeset: 7301:d02e2d7d9d24
user: Dirk Haun <dirk at haun-online.de>
date: Thu Sep 10 10:06:32 2009 +0200
description:
Workaround for the problems with the PHP version that Apple ships with Mac OS X 10.6 "Snow Leopard"
diffstat:
public_html/admin/install/bigdump.php | 2 +-
public_html/admin/install/lib-install.php | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 3082f34983ea -r d02e2d7d9d24 public_html/admin/install/bigdump.php
--- a/public_html/admin/install/bigdump.php Sun Aug 30 19:14:36 2009 +0200
+++ b/public_html/admin/install/bigdump.php Thu Sep 10 10:06:32 2009 +0200
@@ -389,7 +389,7 @@
echo '<p><a href="migrate.php">' . $LANG_BIGDUMP[30] . '</a> ' . $LANG_BIGDUMP[31] . '</p>' . LB;
}
-if ($dbconnection) mysql_close();
+if ($dbconnection) mysql_close($dbconnection);
if ($file && !$gzipmode) fclose($file);
else if ($file && $gzipmode) gzclose($file);
diff -r 3082f34983ea -r d02e2d7d9d24 public_html/admin/install/lib-install.php
--- a/public_html/admin/install/lib-install.php Sun Aug 30 19:14:36 2009 +0200
+++ b/public_html/admin/install/lib-install.php Thu Sep 10 10:06:32 2009 +0200
@@ -243,11 +243,12 @@
*/
function mysql_v($_DB_host, $_DB_user, $_DB_pass)
{
- if (@mysql_connect($_DB_host, $_DB_user, $_DB_pass) === false) {
+ $db_handle = @mysql_connect($_DB_host, $_DB_user, $_DB_pass);
+ if ($db_handle === false) {
return false;
}
- $mysqlv = @mysql_get_server_info();
+ $mysqlv = @mysql_get_server_info($db_handle);
if (!empty($mysqlv)) {
preg_match('/^([0-9]+).([0-9]+).([0-9]+)/', $mysqlv, $match);
@@ -259,7 +260,7 @@
$mysqlminorv = 0;
$mysqlrev = 0;
}
- @mysql_close();
+ @mysql_close($db_handle);
return array($mysqlmajorv, $mysqlminorv, $mysqlrev);
}
More information about the geeklog-cvs
mailing list