summaryrefslogtreecommitdiff
path: root/includes/FileStore.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /includes/FileStore.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'includes/FileStore.php')
-rw-r--r--includes/FileStore.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/FileStore.php b/includes/FileStore.php
index 35ebd554..1fd35b01 100644
--- a/includes/FileStore.php
+++ b/includes/FileStore.php
@@ -36,6 +36,9 @@ class FileStore {
* @fixme Probably only works on MySQL. Abstract to the Database class?
*/
static function lock() {
+ global $wgDBtype;
+ if ($wgDBtype != 'mysql')
+ return true;
$dbw = wfGetDB( DB_MASTER );
$lockname = $dbw->addQuotes( FileStore::lockName() );
$result = $dbw->query( "SELECT GET_LOCK($lockname, 5) AS lockstatus", __METHOD__ );
@@ -54,10 +57,13 @@ class FileStore {
* Release the global file store lock.
*/
static function unlock() {
+ global $wgDBtype;
+ if ($wgDBtype != 'mysql')
+ return true;
$dbw = wfGetDB( DB_MASTER );
$lockname = $dbw->addQuotes( FileStore::lockName() );
$result = $dbw->query( "SELECT RELEASE_LOCK($lockname)", __METHOD__ );
- $row = $dbw->fetchObject( $result );
+ $dbw->fetchObject( $result );
$dbw->freeResult( $result );
}