Index: trunk/phase3/includes/Article.php |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | $this->insertRedirectEntry( $retval ); |
128 | 128 | return $retval; |
129 | 129 | } |
130 | | - |
| 130 | + |
131 | 131 | /** |
132 | 132 | * Insert or update the redirect table entry for this page to indicate |
133 | 133 | * it redirects to $rt . |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | // recurse through to only get the final target |
168 | 168 | return $this->getRedirectURL( Title::newFromRedirectRecurse( $text ) ); |
169 | 169 | } |
170 | | - |
| 170 | + |
171 | 171 | /** |
172 | 172 | * Get the Title object or URL to use for a redirect. We use Title |
173 | 173 | * objects for same-wiki, non-special redirects and URLs for everything |
— | — | @@ -966,11 +966,11 @@ |
967 | 967 | if ( $oldid === $this->getLatest() && $this->useParserCache( false ) ) { |
968 | 968 | $this->mParserOutput = $parserCache->get( $this, $parserOptions ); |
969 | 969 | if ( $this->mParserOutput ) { |
970 | | - wfDebug( __METHOD__ . ": showing parser cache for current rev permalink\n" ); |
| 970 | + wfDebug( __METHOD__ . ": showing parser cache for current rev permalink\n" ); |
971 | 971 | $wgOut->addParserOutput( $this->mParserOutput ); |
972 | 972 | $wgOut->setRevisionId( $this->mLatest ); |
973 | 973 | $outputDone = true; |
974 | | - break; |
| 974 | + break; |
975 | 975 | } |
976 | 976 | } |
977 | 977 | } |
— | — | @@ -1005,7 +1005,7 @@ |
1006 | 1006 | $this->checkTouched(); |
1007 | 1007 | $key = $parserCache->getKey( $this, $parserOptions ); |
1008 | 1008 | $poolArticleView = new PoolWorkArticleView( $this, $key, $useParserCache, $parserOptions ); |
1009 | | - |
| 1009 | + |
1010 | 1010 | if ( !$poolArticleView->execute() ) { |
1011 | 1011 | # Connection or timeout error |
1012 | 1012 | wfProfileOut( __METHOD__ ); |
— | — | @@ -1482,10 +1482,10 @@ |
1483 | 1483 | if ( !$this->isCurrent() || $wgOut->isPrintable() ) { |
1484 | 1484 | $parserOptions->setEditSection( false ); |
1485 | 1485 | } |
1486 | | - |
| 1486 | + |
1487 | 1487 | $useParserCache = $this->useParserCache( $oldid ); |
1488 | 1488 | $this->outputWikiText( $this->getContent(), $useParserCache, $parserOptions ); |
1489 | | - |
| 1489 | + |
1490 | 1490 | return true; |
1491 | 1491 | } |
1492 | 1492 | |
— | — | @@ -1501,12 +1501,12 @@ |
1502 | 1502 | global $wgOut; |
1503 | 1503 | $parserCache = ParserCache::singleton(); |
1504 | 1504 | $options = clone $this->getParserOptions(); |
1505 | | - |
| 1505 | + |
1506 | 1506 | if ( $wgOut->isPrintable() ) { |
1507 | 1507 | $options->setIsPrintable( true ); |
1508 | 1508 | $options->setEditSection( false ); |
1509 | 1509 | } |
1510 | | - |
| 1510 | + |
1511 | 1511 | $output = $parserCache->getDirty( $this, $options ); |
1512 | 1512 | |
1513 | 1513 | if ( $output ) { |
— | — | @@ -1570,7 +1570,7 @@ |
1571 | 1571 | } |
1572 | 1572 | } |
1573 | 1573 | |
1574 | | - $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png'; |
| 1574 | + $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png'; |
1575 | 1575 | return '<div class="redirectMsg">' . |
1576 | 1576 | Html::element( 'img', array( 'src' => $imageUrl, 'alt' => '#REDIRECT' ) ) . |
1577 | 1577 | '<span class="redirectText">' . $link . '</span></div>'; |
— | — | @@ -1675,7 +1675,7 @@ |
1676 | 1676 | $form = Html::openElement( 'form', $formParams ); |
1677 | 1677 | $form .= Xml::submitButton( wfMsg( 'confirm_purge_button' ) ); |
1678 | 1678 | $form .= Html::closeElement( 'form' ); |
1679 | | - |
| 1679 | + |
1680 | 1680 | $wgOut->addHTML( $form ); |
1681 | 1681 | $wgOut->addWikiMsg( 'confirm-purge-bottom' ); |
1682 | 1682 | |
— | — | @@ -4334,7 +4334,7 @@ |
4335 | 4335 | */ |
4336 | 4336 | public static function getAutosummary( $oldtext, $newtext, $flags ) { |
4337 | 4337 | global $wgContLang; |
4338 | | - |
| 4338 | + |
4339 | 4339 | # Decide what kind of autosummary is needed. |
4340 | 4340 | |
4341 | 4341 | # Redirect autosummaries |
— | — | @@ -4448,7 +4448,7 @@ |
4449 | 4449 | $this->mParserOptions->enableLimitReport(); |
4450 | 4450 | } |
4451 | 4451 | |
4452 | | - // Clone to allow modifications of the return value without affecting |
| 4452 | + // Clone to allow modifications of the return value without affecting |
4453 | 4453 | // the cache |
4454 | 4454 | return clone $this->mParserOptions; |
4455 | 4455 | } |
— | — | @@ -4573,7 +4573,7 @@ |
4574 | 4574 | * consider, so it's not appropriate to use there. |
4575 | 4575 | * |
4576 | 4576 | * @since 1.16 (r52326) for LiquidThreads |
4577 | | - * |
| 4577 | + * |
4578 | 4578 | * @param $oldid mixed integer Revision ID or null |
4579 | 4579 | */ |
4580 | 4580 | public function getParserOutput( $oldid = null ) { |
— | — | @@ -4622,21 +4622,21 @@ |
4623 | 4623 | |
4624 | 4624 | class PoolWorkArticleView extends PoolCounterWork { |
4625 | 4625 | private $mArticle; |
4626 | | - |
| 4626 | + |
4627 | 4627 | function __construct( $article, $key, $useParserCache, $parserOptions ) { |
4628 | 4628 | parent::__construct( 'ArticleView', $key ); |
4629 | 4629 | $this->mArticle = $article; |
4630 | 4630 | $this->cacheable = $useParserCache; |
4631 | 4631 | $this->parserOptions = $parserOptions; |
4632 | 4632 | } |
4633 | | - |
| 4633 | + |
4634 | 4634 | function doWork() { |
4635 | 4635 | return $this->mArticle->doViewParse(); |
4636 | 4636 | } |
4637 | | - |
| 4637 | + |
4638 | 4638 | function getCachedWork() { |
4639 | 4639 | global $wgOut; |
4640 | | - |
| 4640 | + |
4641 | 4641 | $parserCache = ParserCache::singleton(); |
4642 | 4642 | $this->mArticle->mParserOutput = $parserCache->get( $this->mArticle, $this->parserOptions ); |
4643 | 4643 | |
— | — | @@ -4650,21 +4650,21 @@ |
4651 | 4651 | } |
4652 | 4652 | return false; |
4653 | 4653 | } |
4654 | | - |
| 4654 | + |
4655 | 4655 | function fallback() { |
4656 | 4656 | return $this->mArticle->tryDirtyCache(); |
4657 | 4657 | } |
4658 | | - |
| 4658 | + |
4659 | 4659 | function error( $status ) { |
4660 | 4660 | global $wgOut; |
4661 | 4661 | |
4662 | 4662 | $wgOut->clearHTML(); // for release() errors |
4663 | 4663 | $wgOut->enableClientCache( false ); |
4664 | 4664 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
4665 | | - |
| 4665 | + |
4666 | 4666 | $errortext = $status->getWikiText( false, 'view-pool-error' ); |
4667 | 4667 | $wgOut->addWikiText( '<div class="errorbox">' . $errortext . '</div>' ); |
4668 | | - |
| 4668 | + |
4669 | 4669 | return false; |
4670 | 4670 | } |
4671 | 4671 | } |