dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c1d8d1
)
* restore DB connection after unserialization. This is needed in all DB variants...
author
Markus Glaser
<mglaser@users.mediawiki.org>
Sat, 24 Sep 2011 20:07:21 +0000
(20:07 +0000)
committer
Markus Glaser
<mglaser@users.mediawiki.org>
Sat, 24 Sep 2011 20:07:21 +0000
(20:07 +0000)
includes/db/Database.php
patch
|
blob
|
history
diff --git
a/includes/db/Database.php
b/includes/db/Database.php
index
153443f
..
c4e4456
100644
(file)
--- a/
includes/db/Database.php
+++ b/
includes/db/Database.php
@@
-608,6
+608,17
@@
abstract class DatabaseBase implements DatabaseType {
}
}
+ /**
+ * Called by unserialize. Needed to reopen DB connection, which
+ * is not saved by serialize.
+ */
+ public function __wakeup() {
+ if ( $this->isOpen() ) {
+ $this->open( $this->mServer, $this->mUser,
+ $this->mPassword, $this->mDBname);
+ }
+ }
+
/**
* Same as new DatabaseMysql( ... ), kept for backward compatibility
* @deprecated since 1.17