$s.=" | <strong>". wfMsg( "newmessages", $tl ) . "</strong>";
}
}
- if( $wgUser->isSysop() &&
- (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
- ($n = $wgTitle->isDeleted() ) ) {
- $s .= " | " . wfMsg( "thisisdeleted",
- $this->makeKnownLink(
- $wgLang->SpecialPage( "Undelete/" . $wgTitle->getPrefixedDBkey() ),
- wfMsg( "restorelink", $n ) ) );
+
+ $undelete = $this->getUndeleteLink();
+ if( !empty( $undelete ) ) {
+ $s .= " | $undelete";
}
return $s;
}
+ function getUndeleteLink() {
+ global $wgUser, $wgTitle, $wgLang, $action;
+ if( $wgUser->isSysop() &&
+ (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
+ ($n = $wgTitle->isDeleted() ) ) {
+ return wfMsg( "thisisdeleted",
+ $this->makeKnownLink(
+ $wgLang->SpecialPage( "Undelete/" . $wgTitle->getPrefixedDBkey() ),
+ wfMsg( "restorelink", $n ) ) );
+ }
+ return "";
+ }
+
function printableLink()
{
global $wgOut, $wgFeedClasses, $wgRequest;
'<span class="subpages">'.$subpagestr.'</span>'.$out->getSubtitle():
$out->getSubtitle()
);
+ $undelete = $this->getUndeleteLink();
+ $tpl->set(
+ "undelete", !empty($undelete)?
+ '<span class="subpages">'.$undelete.'</span>':
+ ''
+ );
+
$tpl->set( 'catlinks', $this->getCategories());
if( $wgOut->isSyndicated() ) {
$feeds = array();
<div tal:condition="catlinks" id="catlinks" tal:content="structure catlinks"></div>
<h3 id="siteSub" i18n:translate="string:fromwikipedia">From Wikipedia, the free encyclopedia.</h3>
<div id="contentSub" tal:content="structure subtitle"></div>
+ <div id="contentSub" tal:condition="undelete" tal:content="structure undelete"></div>
<div id="siteNotice" tal:condition="sitenotice" tal:content="structure sitenotice"></div>
<!-- <esi:include src="userxy/message"/> cached per user, purged on new message-->
<div tal:condition="newtalk" class="usermessage" tal:content="structure newtalk"></div>