global $wgScript, $wgStylePath, $wgContLanguageCode;
global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest;
global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces;
- global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgHideInterlanguageLinks;
+ global $wgDisableCounters, $wgLogo, $wgHideInterlanguageLinks;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
global $wgUseTrackbacks, $wgUseSiteJs;
$oldid = $wgRequest->getVal( 'oldid' );
$diff = $wgRequest->getVal( 'diff' );
+ $action = $wgRequest->getVal( 'action', 'view' );
wfProfileIn( __METHOD__."-init" );
$this->initPage( $out );
$tpl->set( "helppage", wfMsg('helppage'));
*/
$tpl->set( 'searchaction', $this->escapeSearchLink() );
+ $tpl->set( 'searchtitle', SpecialPage::getTitleFor('search')->getPrefixedDBKey() );
$tpl->set( 'search', trim( $wgRequest->getVal( 'search' ) ) );
$tpl->setRef( 'stylepath', $wgStylePath );
$tpl->setRef( 'articlepath', $wgArticlePath );
$tpl->set( 'bottomscripts', $this->bottomScripts() );
$printfooter = "<div class=\"printfooter\">\n" . $this->printSource() . "</div>\n";
- $out->mBodytext .= $printfooter ;
+ $out->mBodytext .= $printfooter . $this->generateDebugHTML();
$tpl->setRef( 'bodytext', $out->mBodytext );
# Language links
// original version by hansm
if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) {
- wfDebug( __METHOD__ . ': Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!' );
+ wfDebug( __METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n" );
}
// allow extensions adding stuff after the page content.
* @private
*/
function buildContentActionUrls() {
- global $wgContLang, $wgLang, $wgOut;
+ global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest;
+
wfProfileIn( __METHOD__ );
- global $wgUser, $wgRequest;
- $action = $wgRequest->getText( 'action' );
- $section = $wgRequest->getText( 'section' );
+ $action = $wgRequest->getVal( 'action', 'view' );
+ $section = $wgRequest->getVal( 'section' );
$content_actions = array();
$prevent_active_tabs = false ;
);
if ( $istalk || $wgOut->showNewSectionLink() ) {
- $content_actions['addsection'] = array(
- 'class' => $section == 'new'?'selected':false,
- 'text' => wfMsg('addsection'),
- 'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' )
- );
+ if ( !$wgOut->forceHideNewSectionLink() ) {
+ $content_actions['addsection'] = array(
+ 'class' => $section == 'new' ? 'selected' : false,
+ 'text' => wfMsg('addsection'),
+ 'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' )
+ );
+ }
}
} elseif ( $this->mTitle->isKnown() ) {
$content_actions['viewsource'] = array(
$content_actions['history'] = array(
'class' => ($action == 'history') ? 'selected' : false,
'text' => wfMsg('history_short'),
- 'href' => $this->mTitle->getLocalUrl( 'action=history')
+ 'href' => $this->mTitle->getLocalUrl( 'action=history' ),
+ 'rel' => 'archives',
);
if( $wgUser->isAllowed('delete') ) {
wfProfileIn( __METHOD__ );
- $action = $wgRequest->getText( 'action' );
+ $action = $wgRequest->getVal( 'action', 'view' );
$nav_urls = array();
$nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() );
// A print stylesheet is attached to all pages, but nobody ever
// figures that out. :) Add a link...
- if( $this->iscontent && ($action == '' || $action == 'view' || $action == 'purge' ) ) {
+ if( $this->iscontent && ( $action == 'view' || $action == 'purge' ) ) {
$nav_urls['print'] = array(
'text' => wfMsg( 'printableversion' ),
'href' => $wgRequest->appendQuery( 'printable=yes' )
* @private
*/
function setupUserJs( $allowUserJs ) {
+ global $wgRequest, $wgJsMimeType;
+
wfProfileIn( __METHOD__ );
- global $wgRequest, $wgJsMimeType;
- $action = $wgRequest->getText('action');
+ $action = $wgRequest->getVal( 'action', 'view' );
if( $allowUserJs && $this->loggedin ) {
if( $this->mTitle->isJsSubpage() and $this->userCanPreview( $action ) ) {