Index: trunk/phase3/includes/api/ApiProtect.php |
— | — | @@ -107,13 +107,13 @@ |
108 | 108 | } |
109 | 109 | |
110 | 110 | $cascade = $params['cascade']; |
111 | | - $articleObj = new Article( $titleObj ); |
112 | 111 | |
113 | 112 | $watch = $params['watch'] ? 'watch' : $params['watchlist']; |
114 | 113 | $this->setWatch( $watch, $titleObj ); |
115 | 114 | |
116 | 115 | if ( $titleObj->exists() ) { |
117 | | - $ok = $articleObj->updateRestrictions( $protections, $params['reason'], $cascade, $expiryarray ); |
| 116 | + $pageObj = WikiPage::factory( $titleObj ); |
| 117 | + $ok = $pageObj->updateRestrictions( $protections, $params['reason'], $cascade, $expiryarray ); |
118 | 118 | } else { |
119 | 119 | $ok = $titleObj->updateTitleProtection( $protections['create'], $params['reason'], $expiryarray['create'] ); |
120 | 120 | } |
Index: trunk/phase3/includes/api/ApiRollback.php |
— | — | @@ -53,10 +53,10 @@ |
54 | 54 | |
55 | 55 | // User and title already validated in call to getTokenSalt from Main |
56 | 56 | $titleObj = $this->getRbTitle(); |
57 | | - $articleObj = new Article( $titleObj ); |
| 57 | + $pageObj = WikiPage::factory( $titleObj ); |
58 | 58 | $summary = ( isset( $params['summary'] ) ? $params['summary'] : '' ); |
59 | 59 | $details = array(); |
60 | | - $retval = $articleObj->doRollback( $this->getRbUser(), $summary, $params['token'], $params['markbot'], $details ); |
| 60 | + $retval = $pageObj->doRollback( $this->getRbUser(), $summary, $params['token'], $params['markbot'], $details, $this->getUser() ); |
61 | 61 | |
62 | 62 | if ( $retval ) { |
63 | 63 | // We don't care about multiple errors, just report one of them |
Index: trunk/phase3/includes/api/ApiPageSet.php |
— | — | @@ -645,8 +645,8 @@ |
646 | 646 | // We found pages that aren't in the redirect table |
647 | 647 | // Add them |
648 | 648 | foreach ( $this->mPendingRedirectIDs as $id => $title ) { |
649 | | - $article = new Article( $title ); |
650 | | - $rt = $article->insertRedirect(); |
| 649 | + $page = WikiPage::factory( $title ); |
| 650 | + $rt = $page->insertRedirect(); |
651 | 651 | if ( !$rt ) { |
652 | 652 | // What the hell. Let's just ignore this |
653 | 653 | continue; |