$sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
$dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=page_id"
. " LIMIT 500"; # quickie emergency brake
- $res = $dbr->query( $sql, DB_SLAVE, "Article::imageLinks" );
+ $res = $dbr->query( $sql, "ImagePage::imageLinks" );
if ( 0 == $dbr->numRows( $res ) ) {
$wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
"WHERE rc_timestamp > '{$cutoff}' {$hidem} " .
"ORDER BY rc_timestamp DESC LIMIT {$limit}";
- $res = $dbr->query( $sql2, DB_SLAVE, $fname );
+ $res = $dbr->query( $sql2, $fname );
$rows = array();
while( $row = $dbr->fetchObject( $res ) ){
$rows[] = $row;
$sql .= "($id, $oldid)";
}
- $dbw->query( $sql, DB_MASTER, $fname );
+ $dbw->query( $sql, $fname );
}
# Now, we record the link from the redirect to the new title.