From: Alexandre Emsenhuber Date: Sat, 8 Mar 2008 19:11:31 +0000 (+0000) Subject: Some cleanup : X-Git-Tag: 1.31.0-rc.0~49199 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=d2b8725cf7700f106b34dc9b26b82f2589379227;p=lhc%2Fweb%2Fwiklou.git Some cleanup : * DB_READ -> DB_SLAVE * DB_WRITE -> DB_MASTER --- diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index 16a44ee665..f89cdcccc6 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -76,7 +76,7 @@ class WhatLinksHerePage { function showIndirectLinks( $level, $target, $limit, $from = 0, $back = 0 ) { global $wgOut; $fname = 'WhatLinksHerePage::showIndirectLinks'; - $dbr = wfGetDB( DB_READ ); + $dbr = wfGetDB( DB_SLAVE ); $options = array(); $ns = $this->request->getIntOrNull( 'namespace' ); diff --git a/maintenance/addwiki.php b/maintenance/addwiki.php index a19b24ce90..fc3b501c45 100644 --- a/maintenance/addwiki.php +++ b/maintenance/addwiki.php @@ -19,7 +19,7 @@ function addWiki( $lang, $site, $dbName ) $name = $wgLanguageNames[$lang]; - $dbw = wfGetDB( DB_WRITE ); + $dbw = wfGetDB( DB_MASTER ); $common = "/home/wikipedia/common"; $maintenance = "$IP/maintenance"; diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 73a15840cb..00b1fe11ec 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -353,7 +353,7 @@ class ParserTest { */ private function setupGlobals($opts = '') { # Save the prefixed / quoted table names for later use when we make the temporaries. - $db = wfGetDB( DB_READ ); + $db = wfGetDB( DB_SLAVE ); $this->oldTableNames = array(); foreach( $this->listTables() as $table ) { $this->oldTableNames[$table] = $db->tableName( $table ); diff --git a/maintenance/refreshLinks.inc b/maintenance/refreshLinks.inc index c471d0eece..70e2a5dcb0 100644 --- a/maintenance/refreshLinks.inc +++ b/maintenance/refreshLinks.inc @@ -142,7 +142,7 @@ function deleteLinksFromNonexistent( $maxLag = 0 ) { wfWaitForSlaves( $maxLag ); - $dbw = wfGetDB( DB_WRITE ); + $dbw = wfGetDB( DB_MASTER ); $linksTables = array( 'pagelinks' => 'pl_from',