Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | |
66 | 66 | $this->setHeaders(); |
67 | 67 | $this->outputHeader(); |
68 | | - $this->allowClickjacking(); |
| 68 | + $out->allowClickjacking(); |
69 | 69 | |
70 | 70 | # GET values |
71 | 71 | $from = $request->getVal( 'from', null ); |
— | — | @@ -73,17 +73,12 @@ |
74 | 74 | |
75 | 75 | $namespaces = $wgContLang->getNamespaces(); |
76 | 76 | |
77 | | - if( !$this->including() ) { |
78 | | - $out->setPagetitle( |
79 | | - ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ? |
80 | | - wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) : |
81 | | - wfMsg( 'allarticles' ) |
82 | | - ); |
83 | | - // Note: The following will not end up in the parser output cache as |
84 | | - // a result even if we wanted to load it on pages including the |
85 | | - // special page it would be unstable. |
86 | | - $out->addModuleStyles( 'mediawiki.special' ); |
87 | | - } |
| 77 | + $out->setPagetitle( |
| 78 | + ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ? |
| 79 | + wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) : |
| 80 | + wfMsg( 'allarticles' ) |
| 81 | + ); |
| 82 | + $out->addModuleStyles( 'mediawiki.special' ); |
88 | 83 | |
89 | 84 | if( isset($par) ) { |
90 | 85 | $this->showChunk( $namespace, $par, $to ); |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -547,12 +547,10 @@ |
548 | 548 | $page = SpecialPage::getPageByAlias( $name ); |
549 | 549 | # Nonexistent? |
550 | 550 | if ( !$page ) { |
551 | | - if ( !$including ) { |
552 | | - $wgOut->setArticleRelated( false ); |
553 | | - $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
554 | | - $wgOut->setStatusCode( 404 ); |
555 | | - $wgOut->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' ); |
556 | | - } |
| 551 | + $wgOut->setArticleRelated( false ); |
| 552 | + $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
| 553 | + $wgOut->setStatusCode( 404 ); |
| 554 | + $wgOut->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' ); |
557 | 555 | wfProfileOut( __METHOD__ ); |
558 | 556 | return false; |
559 | 557 | } |
— | — | @@ -877,10 +875,6 @@ |
878 | 876 | * Sets headers - this should be called from the execute() method of all derived classes! |
879 | 877 | */ |
880 | 878 | function setHeaders() { |
881 | | - if ( $this->including() ) { |
882 | | - // Don't set these headers when special page is being included into an article |
883 | | - return; |
884 | | - } |
885 | 879 | $out = $this->getOutput(); |
886 | 880 | $out->setArticleRelated( false ); |
887 | 881 | $out->setRobotPolicy( "noindex,nofollow" ); |
— | — | @@ -1055,16 +1049,6 @@ |
1056 | 1050 | } |
1057 | 1051 | |
1058 | 1052 | /** |
1059 | | - * Shortcut to call OutputPage::allowClickjacking(); which also takes |
1060 | | - * transclusion into account. |
1061 | | - */ |
1062 | | - public function allowClickjacking() { |
1063 | | - if ( !$this->including() ) { |
1064 | | - $this->getOutput()->allowClickjacking(); |
1065 | | - } |
1066 | | - } |
1067 | | - |
1068 | | - /** |
1069 | 1053 | * Wrapper around wfMessage that sets the current context. Currently this |
1070 | 1054 | * is only the title. |
1071 | 1055 | * |