Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -547,32 +547,34 @@ |
548 | 548 | |
549 | 549 | wfProfileIn( __METHOD__ ); |
550 | 550 | |
551 | | - # Set title from request parameters |
552 | | - $wgTitle = $this->getTitle(); |
| 551 | + // Get title from request parameters, |
| 552 | + // is set on the fly by parseTitle the first time. |
| 553 | + $title = $this->getTitle(); |
553 | 554 | $action = $this->getAction(); |
| 555 | + $wgTitle = $title; |
554 | 556 | |
555 | | - # Send Ajax requests to the Ajax dispatcher. |
556 | | - if ( $wgUseAjax && $action == 'ajax' ) { |
| 557 | + // Send Ajax requests to the Ajax dispatcher. |
| 558 | + if ( $wgUseAjax && true ) { |
557 | 559 | $dispatcher = new AjaxDispatcher(); |
558 | 560 | $dispatcher->performAction(); |
559 | 561 | wfProfileOut( __METHOD__ ); |
560 | 562 | return; |
561 | 563 | } |
562 | 564 | |
563 | | - if ( $wgUseFileCache && $this->getTitle()->getNamespace() >= 0 ) { |
| 565 | + if ( $wgUseFileCache && $title->getNamespace() >= 0 ) { |
564 | 566 | wfProfileIn( 'main-try-filecache' ); |
565 | 567 | if ( HTMLFileCache::useFileCache( $this->context ) ) { |
566 | | - /* Try low-level file cache hit */ |
567 | | - $cache = HTMLFileCache::newFromTitle( $this->getTitle(), $action ); |
| 568 | + // Try low-level file cache hit |
| 569 | + $cache = HTMLFileCache::newFromTitle( $title, $action ); |
568 | 570 | if ( $cache->isCacheGood( /* Assume up to date */ ) ) { |
569 | | - /* Check incoming headers to see if client has this cached */ |
| 571 | + // Check incoming headers to see if client has this cached |
570 | 572 | $timestamp = $cache->cacheTimestamp(); |
571 | 573 | if ( !$this->context->getOutput()->checkLastModified( $timestamp ) ) { |
572 | 574 | $cache->loadFromFileCache( $this->context ); |
573 | 575 | } |
574 | | - # Do any stats increment/watchlist stuff |
| 576 | + // Do any stats increment/watchlist stuff |
575 | 577 | $this->context->getWikiPage()->doViewUpdates( $this->context->getUser() ); |
576 | | - # Tell OutputPage that output is taken care of |
| 578 | + // Tell OutputPage that output is taken care of |
577 | 579 | $this->context->getOutput()->disable(); |
578 | 580 | wfProfileOut( 'main-try-filecache' ); |
579 | 581 | wfProfileOut( __METHOD__ ); |