// We found pages that aren't in the redirect table
// Add them
foreach ( $this->mPendingRedirectIDs as $id => $title ) {
- $article = new Article( $title );
- $rt = $article->insertRedirect();
+ $page = WikiPage::factory( $title );
+ $rt = $page->insertRedirect();
if ( !$rt ) {
// What the hell. Let's just ignore this
continue;
}
$cascade = $params['cascade'];
- $articleObj = new Article( $titleObj );
$watch = $params['watch'] ? 'watch' : $params['watchlist'];
$this->setWatch( $watch, $titleObj );
if ( $titleObj->exists() ) {
- $ok = $articleObj->updateRestrictions( $protections, $params['reason'], $cascade, $expiryarray );
+ $pageObj = WikiPage::factory( $titleObj );
+ $ok = $pageObj->updateRestrictions( $protections, $params['reason'], $cascade, $expiryarray );
} else {
$ok = $titleObj->updateTitleProtection( $protections['create'], $params['reason'], $expiryarray['create'] );
}
// User and title already validated in call to getTokenSalt from Main
$titleObj = $this->getRbTitle();
- $articleObj = new Article( $titleObj );
+ $pageObj = WikiPage::factory( $titleObj );
$summary = ( isset( $params['summary'] ) ? $params['summary'] : '' );
$details = array();
- $retval = $articleObj->doRollback( $this->getRbUser(), $summary, $params['token'], $params['markbot'], $details );
+ $retval = $pageObj->doRollback( $this->getRbUser(), $summary, $params['token'], $params['markbot'], $details, $this->getUser() );
if ( $retval ) {
// We don't care about multiple errors, just report one of them