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' );
$name = $wgLanguageNames[$lang];
- $dbw = wfGetDB( DB_WRITE );
+ $dbw = wfGetDB( DB_MASTER );
$common = "/home/wikipedia/common";
$maintenance = "$IP/maintenance";
*/
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 );
wfWaitForSlaves( $maxLag );
- $dbw = wfGetDB( DB_WRITE );
+ $dbw = wfGetDB( DB_MASTER );
$linksTables = array(
'pagelinks' => 'pl_from',