Index: trunk/phase3/includes/Title.php |
— | — | @@ -387,8 +387,8 @@ |
388 | 388 | $titles = array( $title ); |
389 | 389 | while ( --$recurse > 0 ) { |
390 | 390 | if ( $title->isRedirect() ) { |
391 | | - $article = new Article( $title, 0 ); |
392 | | - $newtitle = $article->getRedirectTarget(); |
| 391 | + $page = WikiPage::factory( $title ); |
| 392 | + $newtitle = $page->getRedirectTarget(); |
393 | 393 | } else { |
394 | 394 | break; |
395 | 395 | } |
— | — | @@ -3281,13 +3281,13 @@ |
3282 | 3282 | if ( $this->getArticleID() === 0 ) { |
3283 | 3283 | MessageCache::singleton()->replace( $this->getDBkey(), false ); |
3284 | 3284 | } else { |
3285 | | - $oldarticle = new Article( $this ); |
3286 | | - MessageCache::singleton()->replace( $this->getDBkey(), $oldarticle->getContent() ); |
| 3285 | + $rev = Revision::newFromTitle( $this ); |
| 3286 | + MessageCache::singleton()->replace( $this->getDBkey(), $rev->getText() ); |
3287 | 3287 | } |
3288 | 3288 | } |
3289 | 3289 | if ( $nt->getNamespace() == NS_MEDIAWIKI ) { |
3290 | | - $newarticle = new Article( $nt ); |
3291 | | - MessageCache::singleton()->replace( $nt->getDBkey(), $newarticle->getContent() ); |
| 3290 | + $rev = Revision::newFromTitle( $nt ); |
| 3291 | + MessageCache::singleton()->replace( $nt->getDBkey(), $rev->getText() ); |
3292 | 3292 | } |
3293 | 3293 | |
3294 | 3294 | wfRunHooks( 'TitleMoveComplete', array( &$this, &$nt, &$wgUser, $pageid, $redirid ) ); |
— | — | @@ -3395,7 +3395,7 @@ |
3396 | 3396 | ); |
3397 | 3397 | $nt->resetArticleID( $oldid ); |
3398 | 3398 | |
3399 | | - $article = new Article( $nt ); |
| 3399 | + $article = WikiPage::factory( $nt ); |
3400 | 3400 | wfRunHooks( 'NewRevisionFromEditComplete', |
3401 | 3401 | array( $article, $nullRevision, $latest, $wgUser ) ); |
3402 | 3402 | $article->setCachedLastEditTime( $now ); |
— | — | @@ -3404,7 +3404,7 @@ |
3405 | 3405 | if ( $createRedirect || !$wgUser->isAllowed( 'suppressredirect' ) ) { |
3406 | 3406 | $mwRedir = MagicWord::get( 'redirect' ); |
3407 | 3407 | $redirectText = $mwRedir->getSynonym( 0 ) . ' [[' . $nt->getPrefixedText() . "]]\n"; |
3408 | | - $redirectArticle = new Article( $this ); |
| 3408 | + $redirectArticle = WikiPage::factory( $this ); |
3409 | 3409 | $newid = $redirectArticle->insertOn( $dbw ); |
3410 | 3410 | if ( $newid ) { // sanity |
3411 | 3411 | $redirectRevision = new Revision( array( |