$this->insertRedirectEntry( $retval );
return $retval;
}
-
+
/**
* Insert or update the redirect table entry for this page to indicate
* it redirects to $rt .
// recurse through to only get the final target
return $this->getRedirectURL( Title::newFromRedirectRecurse( $text ) );
}
-
+
/**
* Get the Title object or URL to use for a redirect. We use Title
* objects for same-wiki, non-special redirects and URLs for everything
if ( $oldid === $this->getLatest() && $this->useParserCache( false ) ) {
$this->mParserOutput = $parserCache->get( $this, $parserOptions );
if ( $this->mParserOutput ) {
- wfDebug( __METHOD__ . ": showing parser cache for current rev permalink\n" );
+ wfDebug( __METHOD__ . ": showing parser cache for current rev permalink\n" );
$wgOut->addParserOutput( $this->mParserOutput );
$wgOut->setRevisionId( $this->mLatest );
$outputDone = true;
- break;
+ break;
}
}
}
$this->checkTouched();
$key = $parserCache->getKey( $this, $parserOptions );
$poolArticleView = new PoolWorkArticleView( $this, $key, $useParserCache, $parserOptions );
-
+
if ( !$poolArticleView->execute() ) {
# Connection or timeout error
wfProfileOut( __METHOD__ );
if ( !$this->isCurrent() || $wgOut->isPrintable() ) {
$parserOptions->setEditSection( false );
}
-
+
$useParserCache = $this->useParserCache( $oldid );
$this->outputWikiText( $this->getContent(), $useParserCache, $parserOptions );
-
+
return true;
}
global $wgOut;
$parserCache = ParserCache::singleton();
$options = clone $this->getParserOptions();
-
+
if ( $wgOut->isPrintable() ) {
$options->setIsPrintable( true );
$options->setEditSection( false );
}
-
+
$output = $parserCache->getDirty( $this, $options );
if ( $output ) {
}
}
- $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png';
+ $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png';
return '<div class="redirectMsg">' .
Html::element( 'img', array( 'src' => $imageUrl, 'alt' => '#REDIRECT' ) ) .
'<span class="redirectText">' . $link . '</span></div>';
$form = Html::openElement( 'form', $formParams );
$form .= Xml::submitButton( wfMsg( 'confirm_purge_button' ) );
$form .= Html::closeElement( 'form' );
-
+
$wgOut->addHTML( $form );
$wgOut->addWikiMsg( 'confirm-purge-bottom' );
*/
public static function getAutosummary( $oldtext, $newtext, $flags ) {
global $wgContLang;
-
+
# Decide what kind of autosummary is needed.
# Redirect autosummaries
$this->mParserOptions->enableLimitReport();
}
- // Clone to allow modifications of the return value without affecting
+ // Clone to allow modifications of the return value without affecting
// the cache
return clone $this->mParserOptions;
}
* consider, so it's not appropriate to use there.
*
* @since 1.16 (r52326) for LiquidThreads
- *
+ *
* @param $oldid mixed integer Revision ID or null
*/
public function getParserOutput( $oldid = null ) {
class PoolWorkArticleView extends PoolCounterWork {
private $mArticle;
-
+
function __construct( $article, $key, $useParserCache, $parserOptions ) {
parent::__construct( 'ArticleView', $key );
$this->mArticle = $article;
$this->cacheable = $useParserCache;
$this->parserOptions = $parserOptions;
}
-
+
function doWork() {
return $this->mArticle->doViewParse();
}
-
+
function getCachedWork() {
global $wgOut;
-
+
$parserCache = ParserCache::singleton();
$this->mArticle->mParserOutput = $parserCache->get( $this->mArticle, $this->parserOptions );
}
return false;
}
-
+
function fallback() {
return $this->mArticle->tryDirtyCache();
}
-
+
function error( $status ) {
global $wgOut;
$wgOut->clearHTML(); // for release() errors
$wgOut->enableClientCache( false );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
-
+
$errortext = $status->getWikiText( false, 'view-pool-error' );
$wgOut->addWikiText( '<div class="errorbox">' . $errortext . '</div>' );
-
+
return false;
}
}