From d2b8725cf7700f106b34dc9b26b82f2589379227 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 8 Mar 2008 19:11:31 +0000 Subject: [PATCH] Some cleanup : * DB_READ -> DB_SLAVE * DB_WRITE -> DB_MASTER --- includes/SpecialWhatlinkshere.php | 2 +- maintenance/addwiki.php | 2 +- maintenance/parserTests.inc | 2 +- maintenance/refreshLinks.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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', -- 2.20.1