Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | global $wgScript, $wgStylePath, $wgContLanguageCode; |
140 | 140 | global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest; |
141 | 141 | global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces; |
142 | | - global $wgDisableCounters, $wgLogo, $action, $wgHideInterlanguageLinks; |
| 142 | + global $wgDisableCounters, $wgLogo, $wgHideInterlanguageLinks; |
143 | 143 | global $wgMaxCredits, $wgShowCreditsIfMax; |
144 | 144 | global $wgPageShowWatchingUsers; |
145 | 145 | global $wgUseTrackbacks, $wgUseSiteJs; |
— | — | @@ -148,6 +148,7 @@ |
149 | 149 | |
150 | 150 | $oldid = $wgRequest->getVal( 'oldid' ); |
151 | 151 | $diff = $wgRequest->getVal( 'diff' ); |
| 152 | + $action = $wgRequest->getVal( 'action', 'view' ); |
152 | 153 | |
153 | 154 | wfProfileIn( __METHOD__."-init" ); |
154 | 155 | $this->initPage( $out ); |
— | — | @@ -647,12 +648,12 @@ |
648 | 649 | * @private |
649 | 650 | */ |
650 | 651 | function buildContentActionUrls() { |
651 | | - global $wgContLang, $wgLang, $wgOut; |
| 652 | + global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest; |
| 653 | + |
652 | 654 | wfProfileIn( __METHOD__ ); |
653 | 655 | |
654 | | - global $wgUser, $wgRequest; |
655 | | - $action = $wgRequest->getText( 'action' ); |
656 | | - $section = $wgRequest->getText( 'section' ); |
| 656 | + $action = $wgRequest->getVal( 'action', 'view' ); |
| 657 | + $section = $wgRequest->getVal( 'section' ); |
657 | 658 | $content_actions = array(); |
658 | 659 | |
659 | 660 | $prevent_active_tabs = false ; |
— | — | @@ -849,7 +850,7 @@ |
850 | 851 | |
851 | 852 | wfProfileIn( __METHOD__ ); |
852 | 853 | |
853 | | - $action = $wgRequest->getText( 'action' ); |
| 854 | + $action = $wgRequest->getVal( 'action', 'view' ); |
854 | 855 | |
855 | 856 | $nav_urls = array(); |
856 | 857 | $nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() ); |
— | — | @@ -872,7 +873,7 @@ |
873 | 874 | |
874 | 875 | // A print stylesheet is attached to all pages, but nobody ever |
875 | 876 | // figures that out. :) Add a link... |
876 | | - if( $this->iscontent && ($action == '' || $action == 'view' || $action == 'purge' ) ) { |
| 877 | + if( $this->iscontent && ( $action == 'view' || $action == 'purge' ) ) { |
877 | 878 | $nav_urls['print'] = array( |
878 | 879 | 'text' => wfMsg( 'printableversion' ), |
879 | 880 | 'href' => $wgRequest->appendQuery( 'printable=yes' ) |
— | — | @@ -966,10 +967,11 @@ |
967 | 968 | * @private |
968 | 969 | */ |
969 | 970 | function setupUserJs( $allowUserJs ) { |
| 971 | + global $wgRequest, $wgJsMimeType; |
| 972 | + |
970 | 973 | wfProfileIn( __METHOD__ ); |
971 | 974 | |
972 | | - global $wgRequest, $wgJsMimeType; |
973 | | - $action = $wgRequest->getText('action'); |
| 975 | + $action = $wgRequest->getVal( 'action', 'view' ); |
974 | 976 | |
975 | 977 | if( $allowUserJs && $this->loggedin ) { |
976 | 978 | if( $this->mTitle->isJsSubpage() and $this->userCanPreview( $action ) ) { |