* Put OutputPage::$mIsArticleRelated declaration just below $mIsArticle's one since they are related
* Made DifferenceEngine consistent with action=view, i.e. setting that flag to true when displaying any version of the page, current or not
* Made Skin::getCopyright() always use history_copyright when displaying an old version, regardless to the diff parameter
* Changed some checks from namespace != NS_SPECIAL && action=view to isArticle() so that they don't get executed when e.g. throwing an Exception (or similar things)
return;
}
- $wgOut->setArticleFlag( true );
# Set page title (may be overridden by DISPLAYTITLE)
$wgOut->setPageTitle( $this->getTitle()->getPrefixedText() );
return;
}
+ $wgOut->setArticleFlag( true );
# Allow frames by default
$wgOut->allowClickjacking();
wfProfileIn( __METHOD__ );
wfDebug( __METHOD__.": enter\n" );
- // This is not an article
- $wgOut->setArticleFlag( false );
-
$this->importFormData( $wgRequest );
$this->firsttime = false;
var $mHTMLtitle = '';
/// Should be private. Is the displayed content related to the source of the corresponding wiki article.
- var $mIsarticle = true;
+ var $mIsarticle = false;
+
+ /**
+ * Should be private. Has get/set methods properly documented.
+ * Stores "article flag" toggle.
+ */
+ var $mIsArticleRelated = true;
/**
* Should be private. We have to set isPrintable(). Some pages should
// Parser related.
var $mContainsOldMagic = 0, $mContainsNewMagic = 0;
- /**
- * Should be private. Has get/set methods properly documented.
- * Stores "article flag" toggle.
- */
- var $mIsArticleRelated = true;
-
/// lazy initialised, use parserOptions()
protected $mParserOptions = null;
$bodyAttrs = array();
# Crazy edit-on-double-click stuff
- $action = $this->getRequest()->getVal( 'action', 'view' );
-
- if (
- $this->getTitle()->getNamespace() != NS_SPECIAL &&
- in_array( $action, array( 'view', 'purge' ) ) &&
- $this->getUser()->getOption( 'editondblclick' )
- )
- {
+ if ( $this->isArticle() && $this->getUser()->getOption( 'editondblclick' ) ) {
$editUrl = $this->getTitle()->getLocalUrl( $sk->editUrlOptions() );
$bodyAttrs['ondblclick'] = "document.location = '" .
Xml::escapeJsString( $editUrl ) . "'";
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
if ( $type == 'detect' ) {
- $diff = $this->getRequest()->getVal( 'diff' );
-
- if ( is_null( $diff ) && !$this->isRevisionCurrent() && wfMsgForContent( 'history_copyright' ) !== '-' ) {
+ if ( !$this->isRevisionCurrent() && wfMsgForContent( 'history_copyright' ) !== '-' ) {
$type = 'history';
} else {
$type = 'normal';
wfProfileIn( __METHOD__ );
- $action = $wgRequest->getVal( 'action', 'view' );
-
$nav_urls = array();
$nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() );
if( $wgUploadNavigationUrl ) {
// A print stylesheet is attached to all pages, but nobody ever
// figures that out. :) Add a link...
- if( $this->getTitle()->getNamespace() != NS_SPECIAL && ( $action == 'view' || $action == 'purge' ) ) {
+ if( $out->isArticle() ) {
if ( !$out->isPrintable() ) {
$nav_urls['print'] = array(
'text' => wfMsg( 'printableversion' ),
return;
}
- $wgOut->setArticleFlag( false );
if ( !$this->loadRevisionData() ) {
// Sounds like a deleted revision... Let's see what we can do.
$t = $this->mTitle->getPrefixedText();
wfRunHooks( 'DiffViewHeader', array( $this, $this->mOldRev, $this->mNewRev ) );
- if ( $this->mNewRev->isCurrent() ) {
- $wgOut->setArticleFlag( true );
- }
-
# mOldid is false if the difference engine is called with a "vague" query for
# a diff between a version V and its previous version V' AND the version V
# is the first version of that article. In that case, V' does not exist.
$this->loadNewText();
$wgOut->setRevisionId( $this->mNewRev->getId() );
+ $wgOut->setArticleFlag( true );
if ( $this->mTitle->isCssJsSubpage() || $this->mTitle->isCssOrJsPage() ) {
// Stolen from Article::view --AG 2007-10-11
wfProfileOut( __METHOD__ );
return;
}
- if ( $this->mNewRev->isCurrent() ) {
- $wgOut->setArticleFlag( true );
- }
# Check if user is allowed to look at this page. If not, bail out.
- #
if ( !$this->mTitle->userCanRead() ) {
$wgOut->loginToUse();
$wgOut->output();