$out->addModuleStyles( array(
'mediawiki.legacy.shared',
'mediawiki.legacy.commonPrint',
- 'mediawiki.ui.button'
+ 'mediawiki.ui.button',
+ 'mediawiki.sectionAnchor'
) );
}
}
protected function setupTemplateForOutput() {
- wfProfileIn( __METHOD__ );
$request = $this->getRequest();
$user = $this->getUser();
$title = $this->getTitle();
- wfProfileIn( __METHOD__ . '-init' );
$tpl = $this->setupTemplate( $this->template, 'skins' );
- wfProfileOut( __METHOD__ . '-init' );
- wfProfileIn( __METHOD__ . '-stuff' );
$this->thispage = $title->getPrefixedDBkey();
$this->titletxt = $title->getPrefixedText();
$this->userpage = $user->getUserPage()->getPrefixedText();
$this->userpageUrlDetails = self::makeKnownUrlDetails( $this->userpage );
}
- wfProfileOut( __METHOD__ . '-stuff' );
-
- wfProfileOut( __METHOD__ );
-
return $tpl;
}
* @param OutputPage $out
*/
function outputPage( OutputPage $out = null ) {
- wfProfileIn( __METHOD__ );
Profiler::instance()->setTemplated( true );
$oldContext = null;
$out = $this->getOutput();
- wfProfileIn( __METHOD__ . '-init' );
$this->initPage( $out );
- wfProfileOut( __METHOD__ . '-init' );
$tpl = $this->prepareQuickTemplate( $out );
// execute template
- wfProfileIn( __METHOD__ . '-execute' );
$res = $tpl->execute();
- wfProfileOut( __METHOD__ . '-execute' );
// result may be an error
$this->printOrError( $res );
$this->setContext( $oldContext );
}
- wfProfileOut( __METHOD__ );
}
/**
$wgShowCreditsIfMax, $wgArticlePath,
$wgScriptPath, $wgServer;
- wfProfileIn( __METHOD__ );
-
$title = $this->getTitle();
$request = $this->getRequest();
$out = $this->getOutput();
$tpl = $this->setupTemplateForOutput();
- wfProfileIn( __METHOD__ . '-stuff2' );
$tpl->set( 'title', $out->getPageTitle() );
$tpl->set( 'pagetitle', $out->getHTMLTitle() );
$tpl->set( 'displaytitle', $out->mPageLinkTitle );
$tpl->set( 'userlangattributes', $attrs );
}
- wfProfileOut( __METHOD__ . '-stuff2' );
-
- wfProfileIn( __METHOD__ . '-stuff3' );
$tpl->set( 'newtalk', $this->getNewtalks() );
$tpl->set( 'logo', $this->logoText() );
}
$tpl->set( 'copyright', $this->getCopyright() );
}
- wfProfileOut( __METHOD__ . '-stuff3' );
- wfProfileIn( __METHOD__ . '-stuff4' );
$tpl->set( 'copyrightico', $this->getCopyrightIcon() );
$tpl->set( 'poweredbyico', $this->getPoweredBy() );
$tpl->set( 'disclaimer', $this->disclaimerLink() );
} else {
$tpl->set( 'language_urls', false );
}
- wfProfileOut( __METHOD__ . '-stuff4' );
- wfProfileIn( __METHOD__ . '-stuff5' );
# Personal toolbar
$tpl->set( 'personal_urls', $this->buildPersonalUrls() );
$content_navigation = $this->buildContentNavigationUrls();
// allow extensions adding stuff after the page content.
// See Skin::afterContentHook() for further documentation.
$tpl->set( 'dataAfterContent', $this->afterContentHook() );
- wfProfileOut( __METHOD__ . '-stuff5' );
- wfProfileOut( __METHOD__ );
return $tpl;
}
$title = $this->getTitle();
$request = $this->getRequest();
$pageurl = $title->getLocalURL();
- wfProfileIn( __METHOD__ );
/* set up the default links for the personal toolbar */
$personal_urls = array();
}
Hooks::run( 'PersonalUrls', array( &$personal_urls, &$title, $this ) );
- wfProfileOut( __METHOD__ );
return $personal_urls;
}
self::checkTitle( $title, $name );
return array(
'href' => $title->getLocalURL( $urlaction ),
- 'exists' => $title->getArticleID() != 0,
+ 'exists' => $title->isKnown(),
);
}
+ /**
+ * @todo is this even used?
+ */
function makeArticleUrlDetails( $name, $urlaction = '' ) {
$title = Title::newFromText( $name );
$title = $title->getSubjectPage();
self::checkTitle( $title, $name );
return array(
'href' => $title->getLocalURL( $urlaction ),
- 'exists' => $title->getArticleID() != 0,
+ 'exists' => $title->exists(),
);
}
protected function buildContentNavigationUrls() {
global $wgDisableLangConversion;
- wfProfileIn( __METHOD__ );
-
// Display tabs for the relevant title rather than always the title itself
$title = $this->getRelevantTitle();
$onPage = $title->equals( $this->getTitle() );
);
}
- wfProfileIn( __METHOD__ . '-edit' );
-
// Checks if user can edit the current page if it exists or create it otherwise
if ( $title->quickUserCan( 'edit', $user )
&& ( $title->exists() || $title->quickUserCan( 'create', $user ) )
'primary' => true, // don't collapse this in vector
);
}
- wfProfileOut( __METHOD__ . '-edit' );
- wfProfileIn( __METHOD__ . '-live' );
// Checks if the page exists
if ( $title->exists() ) {
// Adds history view link
'text' => wfMessageFallback( "$skname-view-history", 'history_short' )
->setContext( $this->getContext() )->text(),
'href' => $title->getLocalURL( 'action=history' ),
- 'rel' => 'archives',
);
if ( $title->quickUserCan( 'delete', $user ) ) {
);
}
- wfProfileOut( __METHOD__ . '-live' );
-
// Checks if the user is logged in
if ( $this->loggedin && $user->isAllowedAll( 'viewmywatchlist', 'editmywatchlist' ) ) {
/**
}
}
- wfProfileOut( __METHOD__ );
-
return $content_navigation;
}
*/
private function buildContentActionUrls( $content_navigation ) {
- wfProfileIn( __METHOD__ );
-
// content_actions has been replaced with content_navigation for backwards
// compatibility and also for skins that just want simple tabs content_actions
// is now built by flattening the content_navigation arrays into one
}
}
- wfProfileOut( __METHOD__ );
-
return $content_actions;
}
protected function buildNavUrls() {
global $wgUploadNavigationUrl;
- wfProfileIn( __METHOD__ );
-
$out = $this->getOutput();
$request = $this->getRequest();
'href' => $this->getTitle()->getLocalURL( "action=info" )
);
- if ( $this->getTitle()->getArticleID() ) {
+ if ( $this->getTitle()->exists() ) {
$nav_urls['recentchangeslinked'] = array(
'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalURL()
);
}
}
- wfProfileOut( __METHOD__ );
return $nav_urls;
}