Commit of various live hacks
[mediawiki.git] / includes / SkinLegacy.php
blob480f3eb6dfc0257ab099c93362c3f2c59498943f
1 <?php
2 /**
3 * @defgroup Skins Skins
4 */
6 if ( !defined( 'MEDIAWIKI' ) ) {
7 die( 1 );
10 class SkinLegacy extends SkinTemplate {
11 var $useHeadElement = true;
12 protected $mWatchLinkNum = 0; // Appended to end of watch link id's
14 /**
15 * Add skin specific stylesheets
16 * @param $out OutputPage
18 function setupSkinUserCss( OutputPage $out ) {
19 $out->addModuleStyles( 'mediawiki.legacy.shared' );
20 $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
23 public function commonPrintStylesheet() {
24 return true;
27 /**
28 * This was for the old skins and for users with 640x480 screen.
29 * Please note old skins are still used and might prove useful for
30 * users having old computers or visually impaired.
32 var $mSuppressQuickbar = false;
34 /**
35 * Suppress the quickbar from the output, only for skin supporting
36 * the quickbar
38 public function suppressQuickbar() {
39 $this->mSuppressQuickbar = true;
42 /**
43 * Return whether the quickbar should be suppressed from the output
45 * @return Boolean
47 public function isQuickbarSuppressed() {
48 return $this->mSuppressQuickbar;
51 function qbSetting() {
52 global $wgUser;
53 if ( $this->isQuickbarSuppressed() ) {
54 return 0;
56 $q = $wgUser->getOption( 'quickbar', 0 );
57 if( $q == 5 ) {
58 # 5 is the default, which chooses the setting
59 # depending on the directionality of your interface language
60 global $wgLang;
61 return $wgLang->isRTL() ? 2 : 1;
63 return $q;
68 class LegacyTemplate extends BaseTemplate {
70 // How many search boxes have we made? Avoid duplicate id's.
71 protected $searchboxes = '';
73 function execute() {
74 $this->html( 'headelement' );
75 echo $this->beforeContent();
76 $this->html( 'bodytext' );
77 echo "\n";
78 echo $this->afterContent();
79 $this->html( 'dataAfterContent' );
80 $this->printTrail();
81 echo "\n</body></html>";
84 /**
85 * This will be called immediately after the <body> tag. Split into
86 * two functions to make it easier to subclass.
87 * @return string
89 function beforeContent() {
90 return $this->doBeforeContent();
93 function doBeforeContent() {
94 global $wgLang;
95 wfProfileIn( __METHOD__ );
97 $s = '';
99 $langlinks = $this->otherLanguages();
100 if ( $langlinks ) {
101 $rows = 2;
102 $borderhack = '';
103 } else {
104 $rows = 1;
105 $langlinks = false;
106 $borderhack = 'class="top"';
109 $s .= "\n<div id='content'>\n<div id='topbar'>\n" .
110 "<table border='0' cellspacing='0' width='100%'>\n<tr>\n";
112 if ( $this->getSkin()->qbSetting() == 0 ) {
113 $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
114 $this->getSkin()->logoText( $wgLang->alignStart() ) . '</td>';
117 $l = $wgLang->alignStart();
118 $s .= "<td {$borderhack} align='$l' valign='top'>\n";
120 $s .= $this->topLinks();
121 $s .= '<p class="subtitle">' . $this->pageTitleLinks() . "</p>\n";
123 $r = $wgLang->alignEnd();
124 $s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>";
125 $s .= $this->nameAndLogin();
126 $s .= "\n<br />" . $this->searchForm() . '</td>';
128 if ( $langlinks ) {
129 $s .= "</tr>\n<tr>\n<td class='top' colspan=\"2\">$langlinks</td>\n";
132 $s .= "</tr>\n</table>\n</div>\n";
133 $s .= "\n<div id='article'>\n";
135 $notice = $this->getSkin()->getSiteNotice();
137 if ( $notice ) {
138 $s .= "\n<div id='siteNotice'>$notice</div>\n";
140 $s .= $this->pageTitle();
141 $s .= $this->pageSubtitle();
142 $s .= $this->getSkin()->getCategories();
144 wfProfileOut( __METHOD__ );
145 return $s;
149 * This gets called shortly before the </body> tag.
150 * @return String HTML to be put before </body>
152 function afterContent() {
153 return $this->doAfterContent();
156 /** overloaded by derived classes
157 * @return string
159 function doAfterContent() {
160 return '</div></div>';
163 function searchForm() {
164 global $wgRequest, $wgUseTwoButtonsSearchForm;
166 $search = $wgRequest->getText( 'search' );
168 $s = '<form id="searchform' . $this->searchboxes . '" name="search" class="inline" method="post" action="'
169 . $this->getSkin()->escapeSearchLink() . "\">\n"
170 . '<input type="text" id="searchInput' . $this->searchboxes . '" name="search" size="19" value="'
171 . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />\n"
172 . '<input type="submit" name="go" value="' . wfMsg( 'searcharticle' ) . '" />';
174 if ( $wgUseTwoButtonsSearchForm ) {
175 $s .= '&#160;<input type="submit" name="fulltext" value="' . wfMsg( 'searchbutton' ) . "\" />\n";
176 } else {
177 $s .= ' <a href="' . $this->getSkin()->escapeSearchLink() . '" rel="search">' . wfMsg( 'powersearch-legend' ) . "</a>\n";
180 $s .= '</form>';
182 // Ensure unique id's for search boxes made after the first
183 $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
185 return $s;
188 function pageStats() {
189 $ret = array();
190 $items = array( 'viewcount', 'credits', 'lastmod', 'numberofwatchingusers', 'copyright' );
192 foreach( $items as $item ) {
193 if ( $this->data[$item] !== false ) {
194 $ret[] = $this->data[$item];
198 return implode( ' ', $ret );
201 function topLinks() {
202 global $wgOut;
204 $s = array(
205 $this->getSkin()->mainPageLink(),
206 Linker::specialLink( 'Recentchanges' )
209 if ( $wgOut->isArticleRelated() ) {
210 $s[] = $this->editThisPage();
211 $s[] = $this->historyLink();
214 # Many people don't like this dropdown box
215 # $s[] = $this->specialPagesList();
217 if ( $this->variantLinks() ) {
218 $s[] = $this->variantLinks();
221 if ( $this->extensionTabLinks() ) {
222 $s[] = $this->extensionTabLinks();
225 // @todo FIXME: Is using Language::pipeList impossible here? Do not quite understand the use of the newline
226 return implode( $s, wfMsgExt( 'pipe-separator', 'escapenoentities' ) . "\n" );
230 * Language/charset variant links for classic-style skins
231 * @return string
233 function variantLinks() {
234 $s = '';
236 /* show links to different language variants */
237 global $wgDisableLangConversion, $wgLang;
239 $title = $this->getSkin()->getTitle();
240 $lang = $title->getPageLanguage();
241 $variants = $lang->getVariants();
243 if ( !$wgDisableLangConversion && sizeof( $variants ) > 1
244 && !$title->isSpecialPage() ) {
245 foreach ( $variants as $code ) {
246 $varname = $lang->getVariantname( $code );
248 if ( $varname == 'disable' ) {
249 continue;
251 $s = $wgLang->pipeList( array(
253 '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
254 ) );
258 return $s;
262 * Compatibility for extensions adding functionality through tabs.
263 * Eventually these old skins should be replaced with SkinTemplate-based
264 * versions, sigh...
265 * @return string
266 * @todo Exterminate! ...that, and replace it with normal SkinTemplate stuff
268 function extensionTabLinks() {
269 $tabs = array();
270 $out = '';
271 $s = array();
272 wfRunHooks( 'SkinTemplateTabs', array( $this->getSkin(), &$tabs ) );
273 foreach ( $tabs as $tab ) {
274 $s[] = Xml::element( 'a',
275 array( 'href' => $tab['href'] ),
276 $tab['text'] );
279 if ( count( $s ) ) {
280 global $wgLang;
282 $out = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
283 $out .= $wgLang->pipeList( $s );
286 return $out;
289 function bottomLinks() {
290 global $wgOut, $wgUser;
291 $sep = wfMsgExt( 'pipe-separator', 'escapenoentities' ) . "\n";
293 $s = '';
294 if ( $wgOut->isArticleRelated() ) {
295 $element[] = '<strong>' . $this->editThisPage() . '</strong>';
297 if ( $wgUser->isLoggedIn() ) {
298 $element[] = $this->watchThisPage();
301 $element[] = $this->talkLink();
302 $element[] = $this->historyLink();
303 $element[] = $this->whatLinksHere();
304 $element[] = $this->watchPageLinksLink();
306 $title = $this->getSkin()->getTitle();
308 if (
309 $title->getNamespace() == NS_USER ||
310 $title->getNamespace() == NS_USER_TALK
312 $id = User::idFromName( $title->getText() );
313 $ip = User::isIP( $title->getText() );
315 # Both anons and non-anons have contributions list
316 if ( $id || $ip ) {
317 $element[] = $this->userContribsLink();
320 if ( $this->getSkin()->showEmailUser( $id ) ) {
321 $element[] = $this->emailUserLink();
325 $s = implode( $element, $sep );
327 if ( $title->getArticleID() ) {
328 $s .= "\n<br />";
330 // Delete/protect/move links for privileged users
331 if ( $wgUser->isAllowed( 'delete' ) ) {
332 $s .= $this->deleteThisPage();
335 if ( $wgUser->isAllowed( 'protect' ) ) {
336 $s .= $sep . $this->protectThisPage();
339 if ( $wgUser->isAllowed( 'move' ) ) {
340 $s .= $sep . $this->moveThisPage();
344 $s .= "<br />\n" . $this->otherLanguages();
347 return $s;
350 function otherLanguages() {
351 global $wgOut, $wgLang, $wgHideInterlanguageLinks;
353 if ( $wgHideInterlanguageLinks ) {
354 return '';
357 $a = $wgOut->getLanguageLinks();
359 if ( 0 == count( $a ) ) {
360 return '';
363 $s = wfMsg( 'otherlanguages' ) . wfMsg( 'colon-separator' );
364 $first = true;
366 if ( $wgLang->isRTL() ) {
367 $s .= '<span dir="ltr">';
370 foreach ( $a as $l ) {
371 if ( !$first ) {
372 $s .= wfMsgExt( 'pipe-separator', 'escapenoentities' );
375 $first = false;
377 $nt = Title::newFromText( $l );
378 $text = Language::fetchLanguageName( $nt->getInterwiki() );
380 $s .= Html::element( 'a',
381 array( 'href' => $nt->getFullURL(), 'title' => $nt->getText(), 'class' => "external" ),
382 $text == '' ? $l : $text );
385 if ( $wgLang->isRTL() ) {
386 $s .= '</span>';
389 return $s;
393 * Show a drop-down box of special pages
394 * @return string
396 function specialPagesList() {
397 global $wgScript;
399 $select = new XmlSelect( 'title' );
400 $pages = SpecialPageFactory::getUsablePages();
401 array_unshift( $pages, SpecialPageFactory::getPage( 'SpecialPages' ) );
402 foreach ( $pages as $obj ) {
403 $select->addOption( $obj->getDescription(),
404 $obj->getTitle()->getPrefixedDBkey() );
407 return Html::rawElement( 'form', array( 'id' => 'specialpages', 'method' => 'get',
408 'action' => $wgScript ), $select->getHTML() . Xml::submitButton( wfMsg( 'go' ) ) );
411 function pageTitleLinks() {
412 global $wgOut, $wgUser, $wgRequest, $wgLang;
414 $oldid = $wgRequest->getVal( 'oldid' );
415 $diff = $wgRequest->getVal( 'diff' );
416 $action = $wgRequest->getText( 'action' );
418 $skin = $this->getSkin();
419 $title = $skin->getTitle();
421 $s[] = $this->printableLink();
422 $disclaimer = $skin->disclaimerLink(); # may be empty
424 if ( $disclaimer ) {
425 $s[] = $disclaimer;
428 $privacy = $skin->privacyLink(); # may be empty too
430 if ( $privacy ) {
431 $s[] = $privacy;
434 if ( $wgOut->isArticleRelated() ) {
435 if ( $title->getNamespace() == NS_FILE ) {
436 $name = $title->getDBkey();
437 $image = wfFindFile( $title );
439 if ( $image ) {
440 $link = htmlspecialchars( $image->getURL() );
441 $style = Linker::getInternalLinkAttributes( $link, $name );
442 $s[] = "<a href=\"{$link}\"{$style}>{$name}</a>";
447 if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) {
448 $s[] .= Linker::linkKnown(
449 $title,
450 wfMsg( 'currentrev' )
454 if ( $wgUser->getNewtalk() ) {
455 # do not show "You have new messages" text when we are viewing our
456 # own talk page
457 if ( !$title->equals( $wgUser->getTalkPage() ) ) {
458 $tl = Linker::linkKnown(
459 $wgUser->getTalkPage(),
460 wfMsgHtml( 'newmessageslink' ),
461 array(),
462 array( 'redirect' => 'no' )
465 $dl = Linker::linkKnown(
466 $wgUser->getTalkPage(),
467 wfMsgHtml( 'newmessagesdifflink' ),
468 array(),
469 array( 'diff' => 'cur' )
471 $s[] = '<strong>' . wfMsg( 'youhavenewmessages', $tl, $dl ) . '</strong>';
472 # disable caching
473 $wgOut->setSquidMaxage( 0 );
474 $wgOut->enableClientCache( false );
478 $undelete = $skin->getUndeleteLink();
480 if ( !empty( $undelete ) ) {
481 $s[] = $undelete;
484 return $wgLang->pipeList( $s );
488 * Gets the h1 element with the page title.
489 * @return string
491 function pageTitle() {
492 global $wgOut;
493 $s = '<h1 class="pagetitle"><span dir="auto">' . $wgOut->getPageTitle() . '</span></h1>';
494 return $s;
497 function pageSubtitle() {
498 global $wgOut;
500 $sub = $wgOut->getSubtitle();
502 if ( $sub == '' ) {
503 global $wgExtraSubtitle;
504 $sub = wfMsgExt( 'tagline', 'parsemag' ) . $wgExtraSubtitle;
507 $subpages = $this->getSkin()->subPageSubtitle();
508 $sub .= !empty( $subpages ) ? "</p><p class='subpages'>$subpages" : '';
509 $s = "<p class='subtitle'>{$sub}</p>\n";
511 return $s;
514 function printableLink() {
515 global $wgOut, $wgRequest, $wgLang;
517 $s = array();
519 if ( !$wgOut->isPrintable() ) {
520 $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalUrl(
521 $wgRequest->appendQueryValue( 'printable', 'yes', true ) ) );
522 $s[] = "<a href=\"$printurl\" rel=\"alternate\">" . wfMsg( 'printableversion' ) . '</a>';
525 if ( $wgOut->isSyndicated() ) {
526 foreach ( $wgOut->getSyndicationLinks() as $format => $link ) {
527 $feedurl = htmlspecialchars( $link );
528 $s[] = "<a href=\"$feedurl\" rel=\"alternate\" type=\"application/{$format}+xml\""
529 . " class=\"feedlink\">" . wfMsgHtml( "feed-$format" ) . "</a>";
532 return $wgLang->pipeList( $s );
536 * @deprecated in 1.19
537 * @return string
539 function getQuickbarCompensator( $rows = 1 ) {
540 wfDeprecated( __METHOD__, '1.19' );
541 return "<td width='152' rowspan='{$rows}'>&#160;</td>";
544 function editThisPage() {
545 global $wgOut;
547 if ( !$wgOut->isArticleRelated() ) {
548 $s = wfMsg( 'protectedpage' );
549 } else {
550 $title = $this->getSkin()->getTitle();
551 if ( $title->quickUserCan( 'edit' ) && $title->exists() ) {
552 $t = wfMsg( 'editthispage' );
553 } elseif ( $title->quickUserCan( 'create' ) && !$title->exists() ) {
554 $t = wfMsg( 'create-this-page' );
555 } else {
556 $t = wfMsg( 'viewsource' );
559 $s = Linker::linkKnown(
560 $title,
562 array(),
563 $this->getSkin()->editUrlOptions()
567 return $s;
570 function deleteThisPage() {
571 global $wgUser, $wgRequest;
573 $diff = $wgRequest->getVal( 'diff' );
574 $title = $this->getSkin()->getTitle();
576 if ( $title->getArticleID() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
577 $t = wfMsg( 'deletethispage' );
579 $s = Linker::linkKnown(
580 $title,
582 array(),
583 array( 'action' => 'delete' )
585 } else {
586 $s = '';
589 return $s;
592 function protectThisPage() {
593 global $wgUser, $wgRequest;
595 $diff = $wgRequest->getVal( 'diff' );
596 $title = $this->getSkin()->getTitle();
598 if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) {
599 if ( $title->isProtected() ) {
600 $text = wfMsg( 'unprotectthispage' );
601 $query = array( 'action' => 'unprotect' );
602 } else {
603 $text = wfMsg( 'protectthispage' );
604 $query = array( 'action' => 'protect' );
607 $s = Linker::linkKnown(
608 $title,
609 $text,
610 array(),
611 $query
613 } else {
614 $s = '';
617 return $s;
620 function watchThisPage() {
621 global $wgOut, $wgUser;
622 ++$this->mWatchLinkNum;
624 // Cache
625 $title = $this->getSkin()->getTitle();
627 if ( $wgOut->isArticleRelated() ) {
628 if ( $title->userIsWatching() ) {
629 $text = wfMsg( 'unwatchthispage' );
630 $query = array(
631 'action' => 'unwatch',
632 'token' => UnwatchAction::getUnwatchToken( $title, $wgUser ),
634 $id = 'mw-unwatch-link' . $this->mWatchLinkNum;
635 } else {
636 $text = wfMsg( 'watchthispage' );
637 $query = array(
638 'action' => 'watch',
639 'token' => WatchAction::getWatchToken( $title, $wgUser ),
641 $id = 'mw-watch-link' . $this->mWatchLinkNum;
644 $s = Linker::linkKnown(
645 $title,
646 $text,
647 array( 'id' => $id ),
648 $query
650 } else {
651 $s = wfMsg( 'notanarticle' );
654 return $s;
657 function moveThisPage() {
658 if ( $this->getSkin()->getTitle()->quickUserCan( 'move' ) ) {
659 return Linker::linkKnown(
660 SpecialPage::getTitleFor( 'Movepage' ),
661 wfMsg( 'movethispage' ),
662 array(),
663 array( 'target' => $this->getSkin()->getTitle()->getPrefixedDBkey() )
665 } else {
666 // no message if page is protected - would be redundant
667 return '';
671 function historyLink() {
672 return Linker::link(
673 $this->getSkin()->getTitle(),
674 wfMsgHtml( 'history' ),
675 array( 'rel' => 'archives' ),
676 array( 'action' => 'history' )
680 function whatLinksHere() {
681 return Linker::linkKnown(
682 SpecialPage::getTitleFor( 'Whatlinkshere', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
683 wfMsgHtml( 'whatlinkshere' )
687 function userContribsLink() {
688 return Linker::linkKnown(
689 SpecialPage::getTitleFor( 'Contributions', $this->getSkin()->getTitle()->getDBkey() ),
690 wfMsgHtml( 'contributions' )
694 function emailUserLink() {
695 return Linker::linkKnown(
696 SpecialPage::getTitleFor( 'Emailuser', $this->getSkin()->getTitle()->getDBkey() ),
697 wfMsgHtml( 'emailuser' )
701 function watchPageLinksLink() {
702 global $wgOut;
704 if ( !$wgOut->isArticleRelated() ) {
705 return wfMessage( 'parentheses', wfMessage( 'notanarticle' )->text() )->escaped();
706 } else {
707 return Linker::linkKnown(
708 SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
709 wfMsgHtml( 'recentchangeslinked-toolbox' )
714 function talkLink() {
715 $title = $this->getSkin()->getTitle();
716 if ( NS_SPECIAL == $title->getNamespace() ) {
717 # No discussion links for special pages
718 return '';
721 $linkOptions = array();
723 if ( $title->isTalkPage() ) {
724 $link = $title->getSubjectPage();
725 switch( $link->getNamespace() ) {
726 case NS_MAIN:
727 $text = wfMsg( 'articlepage' );
728 break;
729 case NS_USER:
730 $text = wfMsg( 'userpage' );
731 break;
732 case NS_PROJECT:
733 $text = wfMsg( 'projectpage' );
734 break;
735 case NS_FILE:
736 $text = wfMsg( 'imagepage' );
737 # Make link known if image exists, even if the desc. page doesn't.
738 if ( wfFindFile( $link ) )
739 $linkOptions[] = 'known';
740 break;
741 case NS_MEDIAWIKI:
742 $text = wfMsg( 'mediawikipage' );
743 break;
744 case NS_TEMPLATE:
745 $text = wfMsg( 'templatepage' );
746 break;
747 case NS_HELP:
748 $text = wfMsg( 'viewhelppage' );
749 break;
750 case NS_CATEGORY:
751 $text = wfMsg( 'categorypage' );
752 break;
753 default:
754 $text = wfMsg( 'articlepage' );
756 } else {
757 $link = $title->getTalkPage();
758 $text = wfMsg( 'talkpage' );
761 $s = Linker::link( $link, $text, array(), array(), $linkOptions );
763 return $s;
766 function commentLink() {
767 global $wgOut;
769 $title = $this->getSkin()->getTitle();
770 if ( $title->isSpecialPage() ) {
771 return '';
774 # __NEWSECTIONLINK___ changes behaviour here
775 # If it is present, the link points to this page, otherwise
776 # it points to the talk page
777 if ( !$title->isTalkPage() && !$wgOut->showNewSectionLink() ) {
778 $title = $title->getTalkPage();
781 return Linker::linkKnown(
782 $title,
783 wfMsg( 'postcomment' ),
784 array(),
785 array(
786 'action' => 'edit',
787 'section' => 'new'
792 function getUploadLink() {
793 global $wgUploadNavigationUrl;
795 if ( $wgUploadNavigationUrl ) {
796 # Using an empty class attribute to avoid automatic setting of "external" class
797 return Linker::makeExternalLink( $wgUploadNavigationUrl, wfMsgHtml( 'upload' ), false, null, array( 'class' => '' ) );
798 } else {
799 return Linker::linkKnown(
800 SpecialPage::getTitleFor( 'Upload' ),
801 wfMsgHtml( 'upload' )
806 function nameAndLogin() {
807 global $wgUser, $wgLang, $wgRequest;
809 $returnTo = $this->getSkin()->getTitle();
810 $ret = '';
812 if ( $wgUser->isAnon() ) {
813 if ( $this->getSkin()->showIPinHeader() ) {
814 $name = $wgRequest->getIP();
816 $talkLink = Linker::link( $wgUser->getTalkPage(),
817 $wgLang->getNsText( NS_TALK ) );
818 $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
820 $ret .= "$name $talkLink";
821 } else {
822 $ret .= wfMsg( 'notloggedin' );
825 $query = array();
827 if ( !$returnTo->isSpecial( 'Userlogout' ) ) {
828 $query['returnto'] = $returnTo->getPrefixedDBkey();
831 $loginlink = $wgUser->isAllowed( 'createaccount' )
832 ? 'nav-login-createaccount'
833 : 'login';
834 $ret .= "\n<br />" . Linker::link(
835 SpecialPage::getTitleFor( 'Userlogin' ),
836 wfMsg( $loginlink ), array(), $query
838 } else {
839 $talkLink = Linker::link( $wgUser->getTalkPage(),
840 $wgLang->getNsText( NS_TALK ) );
841 $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
843 $ret .= Linker::link( $wgUser->getUserPage(),
844 htmlspecialchars( $wgUser->getName() ) );
845 $ret .= " $talkLink<br />";
846 $ret .= $wgLang->pipeList( array(
847 Linker::link(
848 SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ),
849 array(), array( 'returnto' => $returnTo->getPrefixedDBkey() )
851 Linker::specialLink( 'Preferences' ),
852 ) );
855 $ret = $wgLang->pipeList( array(
856 $ret,
857 Linker::link(
858 Title::newFromText( wfMsgForContent( 'helppage' ) ),
859 wfMsg( 'help' )
861 ) );
863 return $ret;