Merge "add htmlform-no and htmlform-yes messages for generic yes-no questions"
[mediawiki.git] / includes / SkinLegacy.php
blob9d657f7b715d949ccaa0981cce2372aafee4c06c
1 <?php
2 /**
3 * Base class for legacy skins.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
20 * @file
23 class SkinLegacy extends SkinTemplate {
24 var $useHeadElement = true;
25 protected $mWatchLinkNum = 0; // Appended to end of watch link id's
27 /**
28 * Add skin specific stylesheets
29 * @param $out OutputPage
31 function setupSkinUserCss( OutputPage $out ) {
32 $out->addModuleStyles( 'mediawiki.legacy.shared' );
33 $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
36 public function commonPrintStylesheet() {
37 return true;
41 class LegacyTemplate extends BaseTemplate {
43 // How many search boxes have we made? Avoid duplicate id's.
44 protected $searchboxes = '';
46 function execute() {
47 $this->html( 'headelement' );
48 echo $this->beforeContent();
49 $this->html( 'bodytext' );
50 echo "\n";
51 echo $this->afterContent();
52 $this->html( 'dataAfterContent' );
53 $this->printTrail();
54 echo "\n</body></html>";
57 /**
58 * This will be called immediately after the "<body>" tag. Split into
59 * two functions to make it easier to subclass.
60 * @return string
62 function beforeContent() {
63 return $this->doBeforeContent();
66 function doBeforeContent() {
67 global $wgLang;
68 wfProfileIn( __METHOD__ );
70 $s = '';
72 $langlinks = $this->otherLanguages();
73 if ( $langlinks ) {
74 $rows = 2;
75 $borderhack = '';
76 } else {
77 $rows = 1;
78 $langlinks = false;
79 $borderhack = 'class="top"';
82 $s .= "\n<div id='content'>\n<div id='topbar'>\n" .
83 "<table cellspacing='0' style='width: 100%;'>\n<tr>\n";
85 if ( $this->getSkin()->qbSetting() == 0 ) {
86 $s .= "<td class='top' style='text-align: left; vertical-align: top;' rowspan='{$rows}'>\n" .
87 $this->getSkin()->logoText( $wgLang->alignStart() ) . '</td>';
90 $l = $wgLang->alignStart();
91 $s .= "<td {$borderhack} style='text-align: $l; vertical-align: top;'>\n";
93 $s .= $this->topLinks();
94 $s .= '<p class="subtitle">' . $this->pageTitleLinks() . "</p>\n";
96 $r = $wgLang->alignEnd();
97 $s .= "</td>\n<td {$borderhack} style='text-align: $r; vertical-align: top;' nowrap='nowrap'>";
98 $s .= $this->nameAndLogin();
99 $s .= "\n<br />" . $this->searchForm() . '</td>';
101 if ( $langlinks ) {
102 $s .= "</tr>\n<tr>\n<td class='top' colspan=\"2\">$langlinks</td>\n";
105 $s .= "</tr>\n</table>\n</div>\n";
106 $s .= "\n<div id='article'>\n";
108 $notice = $this->getSkin()->getSiteNotice();
110 if ( $notice ) {
111 $s .= "\n<div id='siteNotice'>$notice</div>\n";
113 $s .= $this->pageTitle();
114 $s .= $this->pageSubtitle();
115 $s .= $this->getSkin()->getCategories();
117 wfProfileOut( __METHOD__ );
118 return $s;
122 * This gets called shortly before the "</body>" tag.
123 * @return String HTML to be put before "</body>"
125 function afterContent() {
126 return $this->doAfterContent();
129 /** overloaded by derived classes
130 * @return string
132 function doAfterContent() {
133 return '</div></div>';
136 function searchForm() {
137 global $wgRequest, $wgUseTwoButtonsSearchForm;
139 $search = $wgRequest->getText( 'search' );
141 $s = '<form id="searchform' . $this->searchboxes . '" name="search" class="inline" method="post" action="'
142 . $this->getSkin()->escapeSearchLink() . "\">\n"
143 . '<input type="text" id="searchInput' . $this->searchboxes . '" name="search" size="19" value="'
144 . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />\n"
145 . '<input type="submit" name="go" value="' . wfMessage( 'searcharticle' )->text() . '" />';
147 if ( $wgUseTwoButtonsSearchForm ) {
148 $s .= '&#160;<input type="submit" name="fulltext" value="' . wfMessage( 'searchbutton' )->text() . "\" />\n";
149 } else {
150 $s .= ' <a href="' . $this->getSkin()->escapeSearchLink() . '" rel="search">' . wfMessage( 'powersearch-legend' )->text() . "</a>\n";
153 $s .= '</form>';
155 // Ensure unique id's for search boxes made after the first
156 $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
158 return $s;
161 function pageStats() {
162 $ret = array();
163 $items = array( 'viewcount', 'credits', 'lastmod', 'numberofwatchingusers', 'copyright' );
165 foreach( $items as $item ) {
166 if ( $this->data[$item] !== false ) {
167 $ret[] = $this->data[$item];
171 return implode( ' ', $ret );
174 function topLinks() {
175 global $wgOut;
177 $s = array(
178 $this->getSkin()->mainPageLink(),
179 Linker::specialLink( 'Recentchanges' )
182 if ( $wgOut->isArticleRelated() ) {
183 $s[] = $this->editThisPage();
184 $s[] = $this->historyLink();
187 # Many people don't like this dropdown box
188 # $s[] = $this->specialPagesList();
190 if ( $this->variantLinks() ) {
191 $s[] = $this->variantLinks();
194 if ( $this->extensionTabLinks() ) {
195 $s[] = $this->extensionTabLinks();
198 // @todo FIXME: Is using Language::pipeList impossible here? Do not quite understand the use of the newline
199 return implode( $s, wfMessage( 'pipe-separator' )->escaped() . "\n" );
203 * Language/charset variant links for classic-style skins
204 * @return string
206 function variantLinks() {
207 $s = '';
209 /* show links to different language variants */
210 global $wgDisableLangConversion, $wgLang;
212 $title = $this->getSkin()->getTitle();
213 $lang = $title->getPageLanguage();
214 $variants = $lang->getVariants();
216 if ( !$wgDisableLangConversion && count( $variants ) > 1
217 && !$title->isSpecialPage() ) {
218 foreach ( $variants as $code ) {
219 $varname = $lang->getVariantname( $code );
221 if ( $varname == 'disable' ) {
222 continue;
224 $s = $wgLang->pipeList( array(
226 '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
227 ) );
231 return $s;
235 * Compatibility for extensions adding functionality through tabs.
236 * Eventually these old skins should be replaced with SkinTemplate-based
237 * versions, sigh...
238 * @return string
239 * @todo Exterminate! ...that, and replace it with normal SkinTemplate stuff
241 function extensionTabLinks() {
242 $tabs = array();
243 $out = '';
244 $s = array();
245 wfRunHooks( 'SkinTemplateTabs', array( $this->getSkin(), &$tabs ) );
246 foreach ( $tabs as $tab ) {
247 $s[] = Xml::element( 'a',
248 array( 'href' => $tab['href'] ),
249 $tab['text'] );
252 if ( count( $s ) ) {
253 global $wgLang;
255 $out = wfMessage( 'pipe-separator' )->escaped();
256 $out .= $wgLang->pipeList( $s );
259 return $out;
262 function bottomLinks() {
263 global $wgOut, $wgUser;
264 $sep = wfMessage( 'pipe-separator' )->escaped() . "\n";
266 $s = '';
267 if ( $wgOut->isArticleRelated() ) {
268 $element[] = '<strong>' . $this->editThisPage() . '</strong>';
270 if ( $wgUser->isLoggedIn() ) {
271 $element[] = $this->watchThisPage();
274 $element[] = $this->talkLink();
275 $element[] = $this->historyLink();
276 $element[] = $this->whatLinksHere();
277 $element[] = $this->watchPageLinksLink();
279 $title = $this->getSkin()->getTitle();
281 if (
282 $title->getNamespace() == NS_USER ||
283 $title->getNamespace() == NS_USER_TALK
285 $id = User::idFromName( $title->getText() );
286 $ip = User::isIP( $title->getText() );
288 # Both anons and non-anons have contributions list
289 if ( $id || $ip ) {
290 $element[] = $this->userContribsLink();
293 if ( $this->getSkin()->showEmailUser( $id ) ) {
294 $element[] = $this->emailUserLink();
298 $s = implode( $element, $sep );
300 if ( $title->getArticleID() ) {
301 $s .= "\n<br />";
303 // Delete/protect/move links for privileged users
304 if ( $wgUser->isAllowed( 'delete' ) ) {
305 $s .= $this->deleteThisPage();
308 if ( $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
309 $s .= $sep . $this->protectThisPage();
312 if ( $wgUser->isAllowed( 'move' ) ) {
313 $s .= $sep . $this->moveThisPage();
317 $s .= "<br />\n" . $this->otherLanguages();
320 return $s;
323 function otherLanguages() {
324 global $wgOut, $wgLang, $wgHideInterlanguageLinks;
326 if ( $wgHideInterlanguageLinks ) {
327 return '';
330 $a = $wgOut->getLanguageLinks();
332 if ( 0 == count( $a ) ) {
333 return '';
336 $s = wfMessage( 'otherlanguages' )->text() . wfMessage( 'colon-separator' )->text();
337 $first = true;
339 if ( $wgLang->isRTL() ) {
340 $s .= '<span dir="ltr">';
343 foreach ( $a as $l ) {
344 if ( !$first ) {
345 $s .= wfMessage( 'pipe-separator' )->escaped();
348 $first = false;
350 $nt = Title::newFromText( $l );
351 $text = Language::fetchLanguageName( $nt->getInterwiki() );
353 $s .= Html::element( 'a',
354 array( 'href' => $nt->getFullURL(), 'title' => $nt->getText(), 'class' => "external" ),
355 $text == '' ? $l : $text );
358 if ( $wgLang->isRTL() ) {
359 $s .= '</span>';
362 return $s;
366 * Show a drop-down box of special pages
367 * @return string
369 function specialPagesList() {
370 global $wgScript;
372 $select = new XmlSelect( 'title' );
373 $pages = SpecialPageFactory::getUsablePages();
374 array_unshift( $pages, SpecialPageFactory::getPage( 'SpecialPages' ) );
375 foreach ( $pages as $obj ) {
376 $select->addOption( $obj->getDescription(),
377 $obj->getTitle()->getPrefixedDBkey() );
380 return Html::rawElement( 'form',
381 array( 'id' => 'specialpages', 'method' => 'get', 'action' => $wgScript ),
382 $select->getHTML() . Xml::submitButton( wfMessage( 'go' )->text() ) );
385 function pageTitleLinks() {
386 global $wgOut, $wgUser, $wgRequest, $wgLang;
388 $oldid = $wgRequest->getVal( 'oldid' );
389 $diff = $wgRequest->getVal( 'diff' );
390 $action = $wgRequest->getText( 'action' );
392 $skin = $this->getSkin();
393 $title = $skin->getTitle();
395 $s[] = $this->printableLink();
396 $disclaimer = $skin->disclaimerLink(); # may be empty
398 if ( $disclaimer ) {
399 $s[] = $disclaimer;
402 $privacy = $skin->privacyLink(); # may be empty too
404 if ( $privacy ) {
405 $s[] = $privacy;
408 if ( $wgOut->isArticleRelated() ) {
409 if ( $title->getNamespace() == NS_FILE ) {
410 $image = wfFindFile( $title );
412 if ( $image ) {
413 $href = $image->getURL();
414 $s[] = Html::element( 'a', array( 'href' => $href,
415 'title' => $href ), $title->getText() );
421 if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) {
422 $s[] .= Linker::linkKnown(
423 $title,
424 wfMessage( 'currentrev' )->text()
428 if ( $wgUser->getNewtalk() ) {
429 # do not show "You have new messages" text when we are viewing our
430 # own talk page
431 if ( !$title->equals( $wgUser->getTalkPage() ) ) {
432 $tl = Linker::linkKnown(
433 $wgUser->getTalkPage(),
434 wfMessage( 'newmessageslink' )->escaped(),
435 array(),
436 array( 'redirect' => 'no' )
439 $dl = Linker::linkKnown(
440 $wgUser->getTalkPage(),
441 wfMessage( 'newmessagesdifflink' )->escaped(),
442 array(),
443 array( 'diff' => 'cur' )
445 $s[] = '<strong>' . wfMessage( 'youhavenewmessages', $tl, $dl )->text() . '</strong>';
446 # disable caching
447 $wgOut->setSquidMaxage( 0 );
448 $wgOut->enableClientCache( false );
452 $undelete = $skin->getUndeleteLink();
454 if ( !empty( $undelete ) ) {
455 $s[] = $undelete;
458 return $wgLang->pipeList( $s );
462 * Gets the h1 element with the page title.
463 * @return string
465 function pageTitle() {
466 global $wgOut;
467 $s = '<h1 class="pagetitle"><span dir="auto">' . $wgOut->getPageTitle() . '</span></h1>';
468 return $s;
471 function pageSubtitle() {
472 global $wgOut;
474 $sub = $wgOut->getSubtitle();
476 if ( $sub == '' ) {
477 global $wgExtraSubtitle;
478 $sub = wfMessage( 'tagline' )->parse() . $wgExtraSubtitle;
481 $subpages = $this->getSkin()->subPageSubtitle();
482 $sub .= !empty( $subpages ) ? "</p><p class='subpages'>$subpages" : '';
483 $s = "<p class='subtitle'>{$sub}</p>\n";
485 return $s;
488 function printableLink() {
489 global $wgOut, $wgRequest, $wgLang;
491 $s = array();
493 if ( !$wgOut->isPrintable() ) {
494 $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalURL(
495 $wgRequest->appendQueryValue( 'printable', 'yes', true ) ) );
496 $s[] = "<a href=\"$printurl\" rel=\"alternate\">"
497 . wfMessage( 'printableversion' )->text() . '</a>';
500 if ( $wgOut->isSyndicated() ) {
501 foreach ( $wgOut->getSyndicationLinks() as $format => $link ) {
502 $feedurl = htmlspecialchars( $link );
503 $s[] = "<a href=\"$feedurl\" rel=\"alternate\" type=\"application/{$format}+xml\""
504 . " class=\"feedlink\">" . wfMessage( "feed-$format" )->escaped() . "</a>";
507 return $wgLang->pipeList( $s );
511 * @deprecated in 1.19
512 * @return string
514 function getQuickbarCompensator( $rows = 1 ) {
515 wfDeprecated( __METHOD__, '1.19' );
516 return "<td style='width: 152px;' rowspan='{$rows}'>&#160;</td>";
519 function editThisPage() {
520 global $wgOut;
522 if ( !$wgOut->isArticleRelated() ) {
523 $s = wfMessage( 'protectedpage' )->text();
524 } else {
525 $title = $this->getSkin()->getTitle();
526 if ( $title->quickUserCan( 'edit' ) && $title->exists() ) {
527 $t = wfMessage( 'editthispage' )->text();
528 } elseif ( $title->quickUserCan( 'create' ) && !$title->exists() ) {
529 $t = wfMessage( 'create-this-page' )->text();
530 } else {
531 $t = wfMessage( 'viewsource' )->text();
534 $s = Linker::linkKnown(
535 $title,
537 array(),
538 $this->getSkin()->editUrlOptions()
542 return $s;
545 function deleteThisPage() {
546 global $wgUser, $wgRequest;
548 $diff = $wgRequest->getVal( 'diff' );
549 $title = $this->getSkin()->getTitle();
551 if ( $title->getArticleID() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
552 $t = wfMessage( 'deletethispage' )->text();
554 $s = Linker::linkKnown(
555 $title,
557 array(),
558 array( 'action' => 'delete' )
560 } else {
561 $s = '';
564 return $s;
567 function protectThisPage() {
568 global $wgUser, $wgRequest;
570 $diff = $wgRequest->getVal( 'diff' );
571 $title = $this->getSkin()->getTitle();
573 if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
574 if ( $title->isProtected() ) {
575 $text = wfMessage( 'unprotectthispage' )->text();
576 $query = array( 'action' => 'unprotect' );
577 } else {
578 $text = wfMessage( 'protectthispage' )->text();
579 $query = array( 'action' => 'protect' );
582 $s = Linker::linkKnown(
583 $title,
584 $text,
585 array(),
586 $query
588 } else {
589 $s = '';
592 return $s;
595 function watchThisPage() {
596 global $wgOut, $wgUser;
597 ++$this->mWatchLinkNum;
599 // Cache
600 $title = $this->getSkin()->getTitle();
602 if ( $wgOut->isArticleRelated() ) {
603 if ( $wgUser->isWatched( $title ) ) {
604 $text = wfMessage( 'unwatchthispage' )->text();
605 $query = array(
606 'action' => 'unwatch',
607 'token' => UnwatchAction::getUnwatchToken( $title, $wgUser ),
609 $id = 'mw-unwatch-link' . $this->mWatchLinkNum;
610 } else {
611 $text = wfMessage( 'watchthispage' )->text();
612 $query = array(
613 'action' => 'watch',
614 'token' => WatchAction::getWatchToken( $title, $wgUser ),
616 $id = 'mw-watch-link' . $this->mWatchLinkNum;
619 $s = Linker::linkKnown(
620 $title,
621 $text,
622 array( 'id' => $id ),
623 $query
625 } else {
626 $s = wfMessage( 'notanarticle' )->text();
629 return $s;
632 function moveThisPage() {
633 if ( $this->getSkin()->getTitle()->quickUserCan( 'move' ) ) {
634 return Linker::linkKnown(
635 SpecialPage::getTitleFor( 'Movepage' ),
636 wfMessage( 'movethispage' )->text(),
637 array(),
638 array( 'target' => $this->getSkin()->getTitle()->getPrefixedDBkey() )
640 } else {
641 // no message if page is protected - would be redundant
642 return '';
646 function historyLink() {
647 return Linker::link(
648 $this->getSkin()->getTitle(),
649 wfMessage( 'history' )->escaped(),
650 array( 'rel' => 'archives' ),
651 array( 'action' => 'history' )
655 function whatLinksHere() {
656 return Linker::linkKnown(
657 SpecialPage::getTitleFor( 'Whatlinkshere', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
658 wfMessage( 'whatlinkshere' )->escaped()
662 function userContribsLink() {
663 return Linker::linkKnown(
664 SpecialPage::getTitleFor( 'Contributions', $this->getSkin()->getTitle()->getDBkey() ),
665 wfMessage( 'contributions' )->escaped()
669 function emailUserLink() {
670 return Linker::linkKnown(
671 SpecialPage::getTitleFor( 'Emailuser', $this->getSkin()->getTitle()->getDBkey() ),
672 wfMessage( 'emailuser' )->escaped()
676 function watchPageLinksLink() {
677 global $wgOut;
679 if ( !$wgOut->isArticleRelated() ) {
680 return wfMessage( 'parentheses', wfMessage( 'notanarticle' )->text() )->escaped();
681 } else {
682 return Linker::linkKnown(
683 SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
684 wfMessage( 'recentchangeslinked-toolbox' )->escaped()
689 function talkLink() {
690 $title = $this->getSkin()->getTitle();
691 if ( NS_SPECIAL == $title->getNamespace() ) {
692 # No discussion links for special pages
693 return '';
696 $linkOptions = array();
698 if ( $title->isTalkPage() ) {
699 $link = $title->getSubjectPage();
700 switch( $link->getNamespace() ) {
701 case NS_MAIN:
702 $text = wfMessage( 'articlepage' );
703 break;
704 case NS_USER:
705 $text = wfMessage( 'userpage' );
706 break;
707 case NS_PROJECT:
708 $text = wfMessage( 'projectpage' );
709 break;
710 case NS_FILE:
711 $text = wfMessage( 'imagepage' );
712 # Make link known if image exists, even if the desc. page doesn't.
713 if ( wfFindFile( $link ) )
714 $linkOptions[] = 'known';
715 break;
716 case NS_MEDIAWIKI:
717 $text = wfMessage( 'mediawikipage' );
718 break;
719 case NS_TEMPLATE:
720 $text = wfMessage( 'templatepage' );
721 break;
722 case NS_HELP:
723 $text = wfMessage( 'viewhelppage' );
724 break;
725 case NS_CATEGORY:
726 $text = wfMessage( 'categorypage' );
727 break;
728 default:
729 $text = wfMessage( 'articlepage' );
731 } else {
732 $link = $title->getTalkPage();
733 $text = wfMessage( 'talkpage' );
736 $s = Linker::link( $link, $text->text(), array(), array(), $linkOptions );
738 return $s;
741 function commentLink() {
742 global $wgOut;
744 $title = $this->getSkin()->getTitle();
745 if ( $title->isSpecialPage() ) {
746 return '';
749 # __NEWSECTIONLINK___ changes behavior here
750 # If it is present, the link points to this page, otherwise
751 # it points to the talk page
752 if ( !$title->isTalkPage() && !$wgOut->showNewSectionLink() ) {
753 $title = $title->getTalkPage();
756 return Linker::linkKnown(
757 $title,
758 wfMessage( 'postcomment' )->text(),
759 array(),
760 array(
761 'action' => 'edit',
762 'section' => 'new'
767 function getUploadLink() {
768 global $wgUploadNavigationUrl;
770 if ( $wgUploadNavigationUrl ) {
771 # Using an empty class attribute to avoid automatic setting of "external" class
772 return Linker::makeExternalLink( $wgUploadNavigationUrl,
773 wfMessage( 'upload' )->escaped(),
774 false, null, array( 'class' => '' ) );
775 } else {
776 return Linker::linkKnown(
777 SpecialPage::getTitleFor( 'Upload' ),
778 wfMessage( 'upload' )->escaped()
783 function nameAndLogin() {
784 global $wgUser, $wgLang, $wgRequest;
786 $returnTo = $this->getSkin()->getTitle();
787 $ret = '';
789 if ( $wgUser->isAnon() ) {
790 if ( $this->getSkin()->showIPinHeader() ) {
791 $name = $wgRequest->getIP();
793 $talkLink = Linker::link( $wgUser->getTalkPage(),
794 $wgLang->getNsText( NS_TALK ) );
795 $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
797 $ret .= "$name $talkLink";
798 } else {
799 $ret .= wfMessage( 'notloggedin' )->text();
802 $query = array();
804 if ( !$returnTo->isSpecial( 'Userlogout' ) ) {
805 $query['returnto'] = $returnTo->getPrefixedDBkey();
808 $loginlink = $wgUser->isAllowed( 'createaccount' )
809 ? 'nav-login-createaccount'
810 : 'login';
811 $ret .= "\n<br />" . Linker::link(
812 SpecialPage::getTitleFor( 'Userlogin' ),
813 wfMessage( $loginlink )->text(), array(), $query
815 } else {
816 $talkLink = Linker::link( $wgUser->getTalkPage(),
817 $wgLang->getNsText( NS_TALK ) );
818 $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
820 $ret .= Linker::link( $wgUser->getUserPage(),
821 htmlspecialchars( $wgUser->getName() ) );
822 $ret .= " $talkLink<br />";
823 $ret .= $wgLang->pipeList( array(
824 Linker::link(
825 SpecialPage::getTitleFor( 'Userlogout' ), wfMessage( 'logout' )->text(),
826 array(), array( 'returnto' => $returnTo->getPrefixedDBkey() )
828 Linker::specialLink( 'Preferences' ),
829 ) );
832 $ret = $wgLang->pipeList( array(
833 $ret,
834 Linker::link(
835 Title::newFromText( wfMessage( 'helppage' )->inContentLanguage()->text() ),
836 wfMessage( 'help' )->text()
838 ) );
840 return $ret;