Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -101,6 +101,7 @@ |
102 | 102 | if ( $ret === null || ( $ret->getDBkey() == '' && $ret->getInterwiki() == '' ) ) { |
103 | 103 | $ret = new BadTitle; |
104 | 104 | } |
| 105 | + |
105 | 106 | return $ret; |
106 | 107 | } |
107 | 108 | |
— | — | @@ -126,7 +127,7 @@ |
127 | 128 | * |
128 | 129 | * @return void |
129 | 130 | */ |
130 | | - public function performRequest() { |
| 131 | + private function performRequest() { |
131 | 132 | global $wgServer, $wgUsePathInfo; |
132 | 133 | |
133 | 134 | wfProfileIn( __METHOD__ ); |
— | — | @@ -358,6 +359,7 @@ |
359 | 360 | $this->context->setTitle( $article->getTitle() ); |
360 | 361 | } |
361 | 362 | } |
| 363 | + |
362 | 364 | wfProfileOut( __METHOD__ ); |
363 | 365 | return $article; |
364 | 366 | } |
— | — | @@ -521,7 +523,7 @@ |
522 | 524 | * Run the current MediaWiki instance |
523 | 525 | * index.php just calls this |
524 | 526 | */ |
525 | | - function run() { |
| 527 | + public function run() { |
526 | 528 | try { |
527 | 529 | $this->checkMaxLag( true ); |
528 | 530 | $this->main(); |
— | — | @@ -539,7 +541,7 @@ |
540 | 542 | * script execution. False to return the result as a boolean. |
541 | 543 | * @return boolean True if we passed the check, false if we surpass the maxlag |
542 | 544 | */ |
543 | | - function checkMaxLag( $abort ) { |
| 545 | + private function checkMaxLag( $abort ) { |
544 | 546 | global $wgShowHostnames; |
545 | 547 | |
546 | 548 | wfProfileIn( __METHOD__ ); |
— | — | @@ -571,7 +573,7 @@ |
572 | 574 | return true; |
573 | 575 | } |
574 | 576 | |
575 | | - function main() { |
| 577 | + private function main() { |
576 | 578 | global $wgUseFileCache, $wgTitle, $wgUseAjax; |
577 | 579 | |
578 | 580 | wfProfileIn( __METHOD__ ); |
— | — | @@ -579,6 +581,7 @@ |
580 | 582 | # Set title from request parameters |
581 | 583 | $wgTitle = $this->getTitle(); |
582 | 584 | $action = $this->getAction(); |
| 585 | + $user = $this->context->getUser(); |
583 | 586 | |
584 | 587 | # Send Ajax requests to the Ajax dispatcher. |
585 | 588 | if ( $wgUseAjax && $action == 'ajax' ) { |
— | — | @@ -602,8 +605,8 @@ |
603 | 606 | $cache->loadFromFileCache(); |
604 | 607 | } |
605 | 608 | # Do any stats increment/watchlist stuff |
606 | | - $article = Article::newFromTitle( $wgTitle, $this->context ); |
607 | | - $article->viewUpdates(); |
| 609 | + $article = WikiPage::factory( $wgTitle ); |
| 610 | + $article->doViewUpdates( $user ); |
608 | 611 | # Tell OutputPage that output is taken care of |
609 | 612 | $this->context->getOutput()->disable(); |
610 | 613 | wfProfileOut( 'main-try-filecache' ); |