Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -223,7 +223,6 @@ |
224 | 224 | return; |
225 | 225 | } |
226 | 226 | |
227 | | - $wgOut->setArticleFlag( false ); |
228 | 227 | if ( !$this->loadRevisionData() ) { |
229 | 228 | // Sounds like a deleted revision... Let's see what we can do. |
230 | 229 | $t = $this->mTitle->getPrefixedText(); |
— | — | @@ -238,10 +237,6 @@ |
239 | 238 | |
240 | 239 | wfRunHooks( 'DiffViewHeader', array( $this, $this->mOldRev, $this->mNewRev ) ); |
241 | 240 | |
242 | | - if ( $this->mNewRev->isCurrent() ) { |
243 | | - $wgOut->setArticleFlag( true ); |
244 | | - } |
245 | | - |
246 | 241 | # mOldid is false if the difference engine is called with a "vague" query for |
247 | 242 | # a diff between a version V and its previous version V' AND the version V |
248 | 243 | # is the first version of that article. In that case, V' does not exist. |
— | — | @@ -521,6 +516,7 @@ |
522 | 517 | |
523 | 518 | $this->loadNewText(); |
524 | 519 | $wgOut->setRevisionId( $this->mNewRev->getId() ); |
| 520 | + $wgOut->setArticleFlag( true ); |
525 | 521 | |
526 | 522 | if ( $this->mTitle->isCssJsSubpage() || $this->mTitle->isCssOrJsPage() ) { |
527 | 523 | // Stolen from Article::view --AG 2007-10-11 |
— | — | @@ -592,12 +588,8 @@ |
593 | 589 | wfProfileOut( __METHOD__ ); |
594 | 590 | return; |
595 | 591 | } |
596 | | - if ( $this->mNewRev->isCurrent() ) { |
597 | | - $wgOut->setArticleFlag( true ); |
598 | | - } |
599 | 592 | |
600 | 593 | # Check if user is allowed to look at this page. If not, bail out. |
601 | | - # |
602 | 594 | if ( !$this->mTitle->userCanRead() ) { |
603 | 595 | $wgOut->loginToUse(); |
604 | 596 | $wgOut->output(); |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -364,7 +364,6 @@ |
365 | 365 | return; |
366 | 366 | } |
367 | 367 | |
368 | | - $wgOut->setArticleFlag( true ); |
369 | 368 | # Set page title (may be overridden by DISPLAYTITLE) |
370 | 369 | $wgOut->setPageTitle( $this->getTitle()->getPrefixedText() ); |
371 | 370 | |
— | — | @@ -377,6 +376,7 @@ |
378 | 377 | return; |
379 | 378 | } |
380 | 379 | |
| 380 | + $wgOut->setArticleFlag( true ); |
381 | 381 | # Allow frames by default |
382 | 382 | $wgOut->allowClickjacking(); |
383 | 383 | |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -374,9 +374,6 @@ |
375 | 375 | wfProfileIn( __METHOD__ ); |
376 | 376 | wfDebug( __METHOD__.": enter\n" ); |
377 | 377 | |
378 | | - // This is not an article |
379 | | - $wgOut->setArticleFlag( false ); |
380 | | - |
381 | 378 | $this->importFormData( $wgRequest ); |
382 | 379 | $this->firsttime = false; |
383 | 380 | |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -47,9 +47,15 @@ |
48 | 48 | var $mHTMLtitle = ''; |
49 | 49 | |
50 | 50 | /// Should be private. Is the displayed content related to the source of the corresponding wiki article. |
51 | | - var $mIsarticle = true; |
| 51 | + var $mIsarticle = false; |
52 | 52 | |
53 | 53 | /** |
| 54 | + * Should be private. Has get/set methods properly documented. |
| 55 | + * Stores "article flag" toggle. |
| 56 | + */ |
| 57 | + var $mIsArticleRelated = true; |
| 58 | + |
| 59 | + /** |
54 | 60 | * Should be private. We have to set isPrintable(). Some pages should |
55 | 61 | * never be printed (ex: redirections). |
56 | 62 | */ |
— | — | @@ -145,12 +151,6 @@ |
146 | 152 | // Parser related. |
147 | 153 | var $mContainsOldMagic = 0, $mContainsNewMagic = 0; |
148 | 154 | |
149 | | - /** |
150 | | - * Should be private. Has get/set methods properly documented. |
151 | | - * Stores "article flag" toggle. |
152 | | - */ |
153 | | - var $mIsArticleRelated = true; |
154 | | - |
155 | 155 | /// lazy initialised, use parserOptions() |
156 | 156 | protected $mParserOptions = null; |
157 | 157 | |
— | — | @@ -2303,14 +2303,7 @@ |
2304 | 2304 | $bodyAttrs = array(); |
2305 | 2305 | |
2306 | 2306 | # Crazy edit-on-double-click stuff |
2307 | | - $action = $this->getRequest()->getVal( 'action', 'view' ); |
2308 | | - |
2309 | | - if ( |
2310 | | - $this->getTitle()->getNamespace() != NS_SPECIAL && |
2311 | | - in_array( $action, array( 'view', 'purge' ) ) && |
2312 | | - $this->getUser()->getOption( 'editondblclick' ) |
2313 | | - ) |
2314 | | - { |
| 2307 | + if ( $this->isArticle() && $this->getUser()->getOption( 'editondblclick' ) ) { |
2315 | 2308 | $editUrl = $this->getTitle()->getLocalUrl( $sk->editUrlOptions() ); |
2316 | 2309 | $bodyAttrs['ondblclick'] = "document.location = '" . |
2317 | 2310 | Xml::escapeJsString( $editUrl ) . "'"; |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -1111,8 +1111,6 @@ |
1112 | 1112 | |
1113 | 1113 | wfProfileIn( __METHOD__ ); |
1114 | 1114 | |
1115 | | - $action = $wgRequest->getVal( 'action', 'view' ); |
1116 | | - |
1117 | 1115 | $nav_urls = array(); |
1118 | 1116 | $nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() ); |
1119 | 1117 | if( $wgUploadNavigationUrl ) { |
— | — | @@ -1129,7 +1127,7 @@ |
1130 | 1128 | |
1131 | 1129 | // A print stylesheet is attached to all pages, but nobody ever |
1132 | 1130 | // figures that out. :) Add a link... |
1133 | | - if( $this->getTitle()->getNamespace() != NS_SPECIAL && ( $action == 'view' || $action == 'purge' ) ) { |
| 1131 | + if( $out->isArticle() ) { |
1134 | 1132 | if ( !$out->isPrintable() ) { |
1135 | 1133 | $nav_urls['print'] = array( |
1136 | 1134 | 'text' => wfMsg( 'printableversion' ), |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -728,9 +728,7 @@ |
729 | 729 | global $wgRightsPage, $wgRightsUrl, $wgRightsText; |
730 | 730 | |
731 | 731 | if ( $type == 'detect' ) { |
732 | | - $diff = $this->getRequest()->getVal( 'diff' ); |
733 | | - |
734 | | - if ( is_null( $diff ) && !$this->isRevisionCurrent() && wfMsgForContent( 'history_copyright' ) !== '-' ) { |
| 732 | + if ( !$this->isRevisionCurrent() && wfMsgForContent( 'history_copyright' ) !== '-' ) { |
735 | 733 | $type = 'history'; |
736 | 734 | } else { |
737 | 735 | $type = 'normal'; |