r78318 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78317‎ | r78318 | r78319 >
Date:19:47, 13 December 2010
Author:ialex
Status:ok
Tags:
Comment:
Removed trailing whitespaces
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -126,7 +126,7 @@
127127 $this->insertRedirectEntry( $retval );
128128 return $retval;
129129 }
130 -
 130+
131131 /**
132132 * Insert or update the redirect table entry for this page to indicate
133133 * it redirects to $rt .
@@ -166,7 +166,7 @@
167167 // recurse through to only get the final target
168168 return $this->getRedirectURL( Title::newFromRedirectRecurse( $text ) );
169169 }
170 -
 170+
171171 /**
172172 * Get the Title object or URL to use for a redirect. We use Title
173173 * objects for same-wiki, non-special redirects and URLs for everything
@@ -966,11 +966,11 @@
967967 if ( $oldid === $this->getLatest() && $this->useParserCache( false ) ) {
968968 $this->mParserOutput = $parserCache->get( $this, $parserOptions );
969969 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" );
971971 $wgOut->addParserOutput( $this->mParserOutput );
972972 $wgOut->setRevisionId( $this->mLatest );
973973 $outputDone = true;
974 - break;
 974+ break;
975975 }
976976 }
977977 }
@@ -1005,7 +1005,7 @@
10061006 $this->checkTouched();
10071007 $key = $parserCache->getKey( $this, $parserOptions );
10081008 $poolArticleView = new PoolWorkArticleView( $this, $key, $useParserCache, $parserOptions );
1009 -
 1009+
10101010 if ( !$poolArticleView->execute() ) {
10111011 # Connection or timeout error
10121012 wfProfileOut( __METHOD__ );
@@ -1482,10 +1482,10 @@
14831483 if ( !$this->isCurrent() || $wgOut->isPrintable() ) {
14841484 $parserOptions->setEditSection( false );
14851485 }
1486 -
 1486+
14871487 $useParserCache = $this->useParserCache( $oldid );
14881488 $this->outputWikiText( $this->getContent(), $useParserCache, $parserOptions );
1489 -
 1489+
14901490 return true;
14911491 }
14921492
@@ -1501,12 +1501,12 @@
15021502 global $wgOut;
15031503 $parserCache = ParserCache::singleton();
15041504 $options = clone $this->getParserOptions();
1505 -
 1505+
15061506 if ( $wgOut->isPrintable() ) {
15071507 $options->setIsPrintable( true );
15081508 $options->setEditSection( false );
15091509 }
1510 -
 1510+
15111511 $output = $parserCache->getDirty( $this, $options );
15121512
15131513 if ( $output ) {
@@ -1570,7 +1570,7 @@
15711571 }
15721572 }
15731573
1574 - $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png';
 1574+ $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png';
15751575 return '<div class="redirectMsg">' .
15761576 Html::element( 'img', array( 'src' => $imageUrl, 'alt' => '#REDIRECT' ) ) .
15771577 '<span class="redirectText">' . $link . '</span></div>';
@@ -1675,7 +1675,7 @@
16761676 $form = Html::openElement( 'form', $formParams );
16771677 $form .= Xml::submitButton( wfMsg( 'confirm_purge_button' ) );
16781678 $form .= Html::closeElement( 'form' );
1679 -
 1679+
16801680 $wgOut->addHTML( $form );
16811681 $wgOut->addWikiMsg( 'confirm-purge-bottom' );
16821682
@@ -4334,7 +4334,7 @@
43354335 */
43364336 public static function getAutosummary( $oldtext, $newtext, $flags ) {
43374337 global $wgContLang;
4338 -
 4338+
43394339 # Decide what kind of autosummary is needed.
43404340
43414341 # Redirect autosummaries
@@ -4448,7 +4448,7 @@
44494449 $this->mParserOptions->enableLimitReport();
44504450 }
44514451
4452 - // Clone to allow modifications of the return value without affecting
 4452+ // Clone to allow modifications of the return value without affecting
44534453 // the cache
44544454 return clone $this->mParserOptions;
44554455 }
@@ -4573,7 +4573,7 @@
45744574 * consider, so it's not appropriate to use there.
45754575 *
45764576 * @since 1.16 (r52326) for LiquidThreads
4577 - *
 4577+ *
45784578 * @param $oldid mixed integer Revision ID or null
45794579 */
45804580 public function getParserOutput( $oldid = null ) {
@@ -4622,21 +4622,21 @@
46234623
46244624 class PoolWorkArticleView extends PoolCounterWork {
46254625 private $mArticle;
4626 -
 4626+
46274627 function __construct( $article, $key, $useParserCache, $parserOptions ) {
46284628 parent::__construct( 'ArticleView', $key );
46294629 $this->mArticle = $article;
46304630 $this->cacheable = $useParserCache;
46314631 $this->parserOptions = $parserOptions;
46324632 }
4633 -
 4633+
46344634 function doWork() {
46354635 return $this->mArticle->doViewParse();
46364636 }
4637 -
 4637+
46384638 function getCachedWork() {
46394639 global $wgOut;
4640 -
 4640+
46414641 $parserCache = ParserCache::singleton();
46424642 $this->mArticle->mParserOutput = $parserCache->get( $this->mArticle, $this->parserOptions );
46434643
@@ -4650,21 +4650,21 @@
46514651 }
46524652 return false;
46534653 }
4654 -
 4654+
46554655 function fallback() {
46564656 return $this->mArticle->tryDirtyCache();
46574657 }
4658 -
 4658+
46594659 function error( $status ) {
46604660 global $wgOut;
46614661
46624662 $wgOut->clearHTML(); // for release() errors
46634663 $wgOut->enableClientCache( false );
46644664 $wgOut->setRobotPolicy( 'noindex,nofollow' );
4665 -
 4665+
46664666 $errortext = $status->getWikiText( false, 'view-pool-error' );
46674667 $wgOut->addWikiText( '<div class="errorbox">' . $errortext . '</div>' );
4668 -
 4668+
46694669 return false;
46704670 }
46714671 }

Status & tagging log