* to the computations individual esi snippets need. Most importantly no body
* parsing for most of those of course.
*
- * PHPTAL support has been moved to a subclass in SkinPHPTal.php,
- * and is optional. You'll need to install PHPTAL manually to use
- * skins that depend on it.
- *
* @package MediaWiki
* @subpackage Skins
*/
/**
* For QuickTemplate, the name of the subclass which
* will actually fill the template.
- *
- * In PHPTal mode, name of PHPTal template to be used.
- * '.pt' will be automaticly added to it on PHPTAL object creation
*/
var $template;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
global $wgUseTrackbacks;
+ global $wgDBname;
$fname = 'SkinTemplate::outputPage';
wfProfileIn( $fname );
} else {
$tpl->set('jsvarurl', false);
}
- if( $wgUser->getNewtalk() ) {
+ $newtalks = $wgUser->getNewMessageLinks();
+
+ if (count($newtalks) == 1 && $newtalks[0]["wiki"] === $wgDBname) {
$usertitle = $this->mUser->getUserPage();
$usertalktitle = $usertitle->getTalkPage();
if( !$usertalktitle->equals( $this->mTitle ) ) {
$ntl = wfMsg( 'youhavenewmessages',
$this->makeKnownLinkObj(
$usertalktitle,
- wfMsgHtml( 'newmessageslink' )
+ wfMsgHtml( 'newmessageslink' ),
+ 'redirect=no'
),
$this->makeKnownLinkObj(
$usertalktitle,
# Disable Cache
$wgOut->setSquidMaxage(0);
}
+ } else if (count($newtalks)) {
+ $sep = str_replace("_", " ", wfMsgHtml("newtalkseperator"));
+ $msgs = array();
+ foreach ($newtalks as $newtalk) {
+ $msgs[] = wfElement("a",
+ array('href' => $newtalk["link"]), $newtalk["wiki"]);
+ }
+ $parts = implode($sep, $msgs);
+ $ntl = wfMsgHtml('youhavenewmessagesmulti', $parts);
+ $wgOut->setSquidMaxage(0);
} else {
$ntl = '';
}
$sql = "SELECT COUNT(*) AS n FROM $watchlist
WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBKey()) .
"' AND wl_namespace=" . $this->mTitle->getNamespace() ;
- $res = $dbr->query( $sql, 'SkinPHPTal::outputPage');
+ $res = $dbr->query( $sql, 'SkinTemplate::outputPage');
$x = $dbr->fetchObject( $res );
$numberofwatchingusers = $x->n;
if ($numberofwatchingusers > 0) {
* @access private
*/
function buildPersonalUrls() {
- global $wgTitle, $wgShowIPinHeader, $wgContLang;
+ global $wgTitle, $wgShowIPinHeader;
$fname = 'SkinTemplate::buildPersonalUrls';
$pageurl = $wgTitle->getLocalURL();
* @access private
*/
function buildContentActionUrls () {
- global $wgContLang, $wgDBprefix;
+ global $wgContLang;
$fname = 'SkinTemplate::buildContentActionUrls';
wfProfileIn( $fname );
wfProfileIn( $fname );
global $wgUser, $wgRequest;
- global $wgSiteSupportPage, $wgEnableUploads, $wgUploadNavigationUrl;
+ global $wgEnableUploads, $wgUploadNavigationUrl;
$action = $wgRequest->getText( 'action' );
$oldid = $wgRequest->getVal( 'oldid' );
$diff = $wgRequest->getVal( 'diff' );
$nav_urls = array();
+ $nav_urls['mainpage'] = array('href' => $this->makeI18nUrl('mainpage'));
if( $wgEnableUploads ) {
if ($wgUploadNavigationUrl) {
$nav_urls['upload'] = array('href' => $wgUploadNavigationUrl );
$nav_urls['contributions'] = array(
'href' => $this->makeSpecialUrl('Contributions/' . $this->mTitle->getText() )
);
- if ( $wgUser->isAllowed( 'protect' ) )
+ if ( $wgUser->isAllowed( 'block' ) )
$nav_urls['blockip'] = array(
'href' => $this->makeSpecialUrl( 'Blockip/' . $this->mTitle->getText() )
);
$fname = 'SkinTemplate::setupPageCss';
wfProfileIn( $fname );
$out = false;
- wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out, $this->mTitle->isProtected() ) );
+ wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out ) );
+
wfProfileOut( $fname );
return $out;
}
$fname = 'SkinTemplate::getUserStylesheet';
wfProfileIn( $fname );
- global $wgUser;
$s = "/* generated user stylesheet */\n";
$s .= $this->reallyDoGetUserStyles();
wfProfileOut( $fname );