Simplify the check to make it more understandable
[mediawiki.git] / includes / SkinLegacy.php
blob77c85a88cb44ab7c86dfa7f107e6850f83de35a1
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.
88 function beforeContent() {
89 return $this->doBeforeContent();
92 function doBeforeContent() {
93 global $wgLang;
94 wfProfileIn( __METHOD__ );
96 $s = '';
98 $langlinks = $this->otherLanguages();
99 if ( $langlinks ) {
100 $rows = 2;
101 $borderhack = '';
102 } else {
103 $rows = 1;
104 $langlinks = false;
105 $borderhack = 'class="top"';
108 $s .= "\n<div id='content'>\n<div id='topbar'>\n" .
109 "<table border='0' cellspacing='0' width='100%'>\n<tr>\n";
111 if ( $this->getSkin()->qbSetting() == 0 ) {
112 $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
113 $this->getSkin()->logoText( $wgLang->alignStart() ) . '</td>';
116 $l = $wgLang->alignStart();
117 $s .= "<td {$borderhack} align='$l' valign='top'>\n";
119 $s .= $this->topLinks();
120 $s .= '<p class="subtitle">' . $this->pageTitleLinks() . "</p>\n";
122 $r = $wgLang->alignEnd();
123 $s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>";
124 $s .= $this->nameAndLogin();
125 $s .= "\n<br />" . $this->searchForm() . '</td>';
127 if ( $langlinks ) {
128 $s .= "</tr>\n<tr>\n<td class='top' colspan=\"2\">$langlinks</td>\n";
131 $s .= "</tr>\n</table>\n</div>\n";
132 $s .= "\n<div id='article'>\n";
134 $notice = $this->getSkin()->getSiteNotice();
136 if ( $notice ) {
137 $s .= "\n<div id='siteNotice'>$notice</div>\n";
139 $s .= $this->pageTitle();
140 $s .= $this->pageSubtitle();
141 $s .= $this->getSkin()->getCategories();
143 wfProfileOut( __METHOD__ );
144 return $s;
148 * This gets called shortly before the </body> tag.
149 * @return String HTML to be put before </body>
151 function afterContent() {
152 return $this->doAfterContent();
155 /** overloaded by derived classes */
156 function doAfterContent() {
157 return '</div></div>';
160 function searchForm() {
161 global $wgRequest, $wgUseTwoButtonsSearchForm;
163 $search = $wgRequest->getText( 'search' );
165 $s = '<form id="searchform' . $this->searchboxes . '" name="search" class="inline" method="post" action="'
166 . $this->getSkin()->escapeSearchLink() . "\">\n"
167 . '<input type="text" id="searchInput' . $this->searchboxes . '" name="search" size="19" value="'
168 . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />\n"
169 . '<input type="submit" name="go" value="' . wfMsg( 'searcharticle' ) . '" />';
171 if ( $wgUseTwoButtonsSearchForm ) {
172 $s .= '&#160;<input type="submit" name="fulltext" value="' . wfMsg( 'searchbutton' ) . "\" />\n";
173 } else {
174 $s .= ' <a href="' . $this->getSkin()->escapeSearchLink() . '" rel="search">' . wfMsg( 'powersearch-legend' ) . "</a>\n";
177 $s .= '</form>';
179 // Ensure unique id's for search boxes made after the first
180 $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
182 return $s;
185 function pageStats() {
186 $ret = array();
187 $items = array( 'viewcount', 'credits', 'lastmod', 'numberofwatchingusers', 'copyright' );
189 foreach( $items as $item ) {
190 if ( $this->data[$item] !== false ) {
191 $ret[] = $this->data[$item];
195 return implode( ' ', $ret );
198 function topLinks() {
199 global $wgOut;
201 $s = array(
202 $this->getSkin()->mainPageLink(),
203 Linker::specialLink( 'Recentchanges' )
206 if ( $wgOut->isArticleRelated() ) {
207 $s[] = $this->editThisPage();
208 $s[] = $this->historyLink();
211 # Many people don't like this dropdown box
212 # $s[] = $this->specialPagesList();
214 if ( $this->variantLinks() ) {
215 $s[] = $this->variantLinks();
218 if ( $this->extensionTabLinks() ) {
219 $s[] = $this->extensionTabLinks();
222 // @todo FIXME: Is using Language::pipeList impossible here? Do not quite understand the use of the newline
223 return implode( $s, wfMsgExt( 'pipe-separator', 'escapenoentities' ) . "\n" );
227 * Language/charset variant links for classic-style skins
228 * @return string
230 function variantLinks() {
231 $s = '';
233 /* show links to different language variants */
234 global $wgDisableLangConversion, $wgLang;
236 $title = $this->getSkin()->getTitle();
237 $lang = $title->getPageLanguage();
238 $variants = $lang->getVariants();
240 if ( !$wgDisableLangConversion && sizeof( $variants ) > 1
241 && !$title->isSpecialPage() ) {
242 foreach ( $variants as $code ) {
243 $varname = $lang->getVariantname( $code );
245 if ( $varname == 'disable' ) {
246 continue;
248 $s = $wgLang->pipeList( array(
250 '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '">' . htmlspecialchars( $varname ) . '</a>'
251 ) );
255 return $s;
259 * Compatibility for extensions adding functionality through tabs.
260 * Eventually these old skins should be replaced with SkinTemplate-based
261 * versions, sigh...
262 * @return string
263 * @todo Exterminate! ...that, and replace it with normal SkinTemplate stuff
265 function extensionTabLinks() {
266 $tabs = array();
267 $out = '';
268 $s = array();
269 wfRunHooks( 'SkinTemplateTabs', array( $this->getSkin(), &$tabs ) );
270 foreach ( $tabs as $tab ) {
271 $s[] = Xml::element( 'a',
272 array( 'href' => $tab['href'] ),
273 $tab['text'] );
276 if ( count( $s ) ) {
277 global $wgLang;
279 $out = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
280 $out .= $wgLang->pipeList( $s );
283 return $out;
286 function bottomLinks() {
287 global $wgOut, $wgUser;
288 $sep = wfMsgExt( 'pipe-separator', 'escapenoentities' ) . "\n";
290 $s = '';
291 if ( $wgOut->isArticleRelated() ) {
292 $element[] = '<strong>' . $this->editThisPage() . '</strong>';
294 if ( $wgUser->isLoggedIn() ) {
295 $element[] = $this->watchThisPage();
298 $element[] = $this->talkLink();
299 $element[] = $this->historyLink();
300 $element[] = $this->whatLinksHere();
301 $element[] = $this->watchPageLinksLink();
303 $title = $this->getSkin()->getTitle();
305 if (
306 $title->getNamespace() == NS_USER ||
307 $title->getNamespace() == NS_USER_TALK
309 $id = User::idFromName( $title->getText() );
310 $ip = User::isIP( $title->getText() );
312 # Both anons and non-anons have contributions list
313 if ( $id || $ip ) {
314 $element[] = $this->userContribsLink();
317 if ( $this->getSkin()->showEmailUser( $id ) ) {
318 $element[] = $this->emailUserLink();
322 $s = implode( $element, $sep );
324 if ( $title->getArticleId() ) {
325 $s .= "\n<br />";
327 // Delete/protect/move links for privileged users
328 if ( $wgUser->isAllowed( 'delete' ) ) {
329 $s .= $this->deleteThisPage();
332 if ( $wgUser->isAllowed( 'protect' ) ) {
333 $s .= $sep . $this->protectThisPage();
336 if ( $wgUser->isAllowed( 'move' ) ) {
337 $s .= $sep . $this->moveThisPage();
341 $s .= "<br />\n" . $this->otherLanguages();
344 return $s;
347 function otherLanguages() {
348 global $wgOut, $wgLang, $wgContLang, $wgHideInterlanguageLinks;
350 if ( $wgHideInterlanguageLinks ) {
351 return '';
354 $a = $wgOut->getLanguageLinks();
356 if ( 0 == count( $a ) ) {
357 return '';
360 $s = wfMsg( 'otherlanguages' ) . wfMsg( 'colon-separator' );
361 $first = true;
363 if ( $wgLang->isRTL() ) {
364 $s .= '<span dir="ltr">';
367 foreach ( $a as $l ) {
368 if ( !$first ) {
369 $s .= wfMsgExt( 'pipe-separator', 'escapenoentities' );
372 $first = false;
374 $nt = Title::newFromText( $l );
375 $text = $wgContLang->getLanguageName( $nt->getInterwiki() );
377 $s .= Html::element( 'a',
378 array( 'href' => $nt->getFullURL(), 'title' => $nt->getText(), 'class' => "external" ),
379 $text == '' ? $l : $text );
382 if ( $wgLang->isRTL() ) {
383 $s .= '</span>';
386 return $s;
390 * Show a drop-down box of special pages
392 function specialPagesList() {
393 global $wgScript;
395 $select = new XmlSelect( 'title' );
396 $pages = SpecialPageFactory::getUsablePages();
397 array_unshift( $pages, SpecialPageFactory::getPage( 'SpecialPages' ) );
398 foreach ( $pages as $obj ) {
399 $select->addOption( $obj->getDescription(),
400 $obj->getTitle()->getPrefixedDBkey() );
403 return Html::rawElement( 'form', array( 'id' => 'specialpages', 'method' => 'get',
404 'action' => $wgScript ), $select->getHTML() . Xml::submitButton( wfMsg( 'go' ) ) );
407 function pageTitleLinks() {
408 global $wgOut, $wgUser, $wgRequest, $wgLang;
410 $oldid = $wgRequest->getVal( 'oldid' );
411 $diff = $wgRequest->getVal( 'diff' );
412 $action = $wgRequest->getText( 'action' );
414 $skin = $this->getSkin();
415 $title = $skin->getTitle();
417 $s[] = $this->printableLink();
418 $disclaimer = $skin->disclaimerLink(); # may be empty
420 if ( $disclaimer ) {
421 $s[] = $disclaimer;
424 $privacy = $skin->privacyLink(); # may be empty too
426 if ( $privacy ) {
427 $s[] = $privacy;
430 if ( $wgOut->isArticleRelated() ) {
431 if ( $title->getNamespace() == NS_FILE ) {
432 $name = $title->getDBkey();
433 $image = wfFindFile( $title );
435 if ( $image ) {
436 $link = htmlspecialchars( $image->getURL() );
437 $style = Linker::getInternalLinkAttributes( $link, $name );
438 $s[] = "<a href=\"{$link}\"{$style}>{$name}</a>";
443 if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) {
444 $s[] .= Linker::linkKnown(
445 $title,
446 wfMsg( 'currentrev' )
450 if ( $wgUser->getNewtalk() ) {
451 # do not show "You have new messages" text when we are viewing our
452 # own talk page
453 if ( !$title->equals( $wgUser->getTalkPage() ) ) {
454 $tl = Linker::linkKnown(
455 $wgUser->getTalkPage(),
456 wfMsgHtml( 'newmessageslink' ),
457 array(),
458 array( 'redirect' => 'no' )
461 $dl = Linker::linkKnown(
462 $wgUser->getTalkPage(),
463 wfMsgHtml( 'newmessagesdifflink' ),
464 array(),
465 array( 'diff' => 'cur' )
467 $s[] = '<strong>' . wfMsg( 'youhavenewmessages', $tl, $dl ) . '</strong>';
468 # disable caching
469 $wgOut->setSquidMaxage( 0 );
470 $wgOut->enableClientCache( false );
474 $undelete = $skin->getUndeleteLink();
476 if ( !empty( $undelete ) ) {
477 $s[] = $undelete;
480 return $wgLang->pipeList( $s );
484 * Gets the h1 element with the page title.
485 * @return string
487 function pageTitle() {
488 global $wgOut;
489 $s = '<h1 class="pagetitle"><span dir="auto">' . $wgOut->getPageTitle() . '</span></h1>';
490 return $s;
493 function pageSubtitle() {
494 global $wgOut;
496 $sub = $wgOut->getSubtitle();
498 if ( $sub == '' ) {
499 global $wgExtraSubtitle;
500 $sub = wfMsgExt( 'tagline', 'parsemag' ) . $wgExtraSubtitle;
503 $subpages = $this->getSkin()->subPageSubtitle();
504 $sub .= !empty( $subpages ) ? "</p><p class='subpages'>$subpages" : '';
505 $s = "<p class='subtitle'>{$sub}</p>\n";
507 return $s;
510 function printableLink() {
511 global $wgOut, $wgRequest, $wgLang;
513 $s = array();
515 if ( !$wgOut->isPrintable() ) {
516 $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalUrl(
517 $wgRequest->appendQueryValue( 'printable', 'yes', true ) ) );
518 $s[] = "<a href=\"$printurl\" rel=\"alternate\">" . wfMsg( 'printableversion' ) . '</a>';
521 if ( $wgOut->isSyndicated() ) {
522 foreach ( $wgOut->getSyndicationLinks() as $format => $link ) {
523 $feedurl = htmlspecialchars( $link );
524 $s[] = "<a href=\"$feedurl\" rel=\"alternate\" type=\"application/{$format}+xml\""
525 . " class=\"feedlink\">" . wfMsgHtml( "feed-$format" ) . "</a>";
528 return $wgLang->pipeList( $s );
532 * @deprecated in 1.19
534 function getQuickbarCompensator( $rows = 1 ) {
535 wfDeprecated( __METHOD__, '1.19' );
536 return "<td width='152' rowspan='{$rows}'>&#160;</td>";
539 function editThisPage() {
540 global $wgOut;
542 if ( !$wgOut->isArticleRelated() ) {
543 $s = wfMsg( 'protectedpage' );
544 } else {
545 $title = $this->getSkin()->getTitle();
546 if ( $title->quickUserCan( 'edit' ) && $title->exists() ) {
547 $t = wfMsg( 'editthispage' );
548 } elseif ( $title->quickUserCan( 'create' ) && !$title->exists() ) {
549 $t = wfMsg( 'create-this-page' );
550 } else {
551 $t = wfMsg( 'viewsource' );
554 $s = Linker::linkKnown(
555 $title,
557 array(),
558 $this->getSkin()->editUrlOptions()
562 return $s;
565 function deleteThisPage() {
566 global $wgUser, $wgRequest;
568 $diff = $wgRequest->getVal( 'diff' );
569 $title = $this->getSkin()->getTitle();
571 if ( $title->getArticleId() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
572 $t = wfMsg( 'deletethispage' );
574 $s = Linker::linkKnown(
575 $title,
577 array(),
578 array( 'action' => 'delete' )
580 } else {
581 $s = '';
584 return $s;
587 function protectThisPage() {
588 global $wgUser, $wgRequest;
590 $diff = $wgRequest->getVal( 'diff' );
591 $title = $this->getSkin()->getTitle();
593 if ( $title->getArticleId() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) {
594 if ( $title->isProtected() ) {
595 $text = wfMsg( 'unprotectthispage' );
596 $query = array( 'action' => 'unprotect' );
597 } else {
598 $text = wfMsg( 'protectthispage' );
599 $query = array( 'action' => 'protect' );
602 $s = Linker::linkKnown(
603 $title,
604 $text,
605 array(),
606 $query
608 } else {
609 $s = '';
612 return $s;
615 function watchThisPage() {
616 global $wgOut, $wgUser;
617 ++$this->mWatchLinkNum;
619 // Cache
620 $title = $this->getSkin()->getTitle();
622 if ( $wgOut->isArticleRelated() ) {
623 if ( $title->userIsWatching() ) {
624 $text = wfMsg( 'unwatchthispage' );
625 $query = array(
626 'action' => 'unwatch',
627 'token' => UnwatchAction::getUnwatchToken( $title, $wgUser ),
629 $id = 'mw-unwatch-link' . $this->mWatchLinkNum;
630 } else {
631 $text = wfMsg( 'watchthispage' );
632 $query = array(
633 'action' => 'watch',
634 'token' => WatchAction::getWatchToken( $title, $wgUser ),
636 $id = 'mw-watch-link' . $this->mWatchLinkNum;
639 $s = Linker::linkKnown(
640 $title,
641 $text,
642 array( 'id' => $id ),
643 $query
645 } else {
646 $s = wfMsg( 'notanarticle' );
649 return $s;
652 function moveThisPage() {
653 if ( $this->getSkin()->getTitle()->quickUserCan( 'move' ) ) {
654 return Linker::linkKnown(
655 SpecialPage::getTitleFor( 'Movepage' ),
656 wfMsg( 'movethispage' ),
657 array(),
658 array( 'target' => $this->getSkin()->getTitle()->getPrefixedDBkey() )
660 } else {
661 // no message if page is protected - would be redundant
662 return '';
666 function historyLink() {
667 return Linker::link(
668 $this->getSkin()->getTitle(),
669 wfMsgHtml( 'history' ),
670 array( 'rel' => 'archives' ),
671 array( 'action' => 'history' )
675 function whatLinksHere() {
676 return Linker::linkKnown(
677 SpecialPage::getTitleFor( 'Whatlinkshere', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
678 wfMsgHtml( 'whatlinkshere' )
682 function userContribsLink() {
683 return Linker::linkKnown(
684 SpecialPage::getTitleFor( 'Contributions', $this->getSkin()->getTitle()->getDBkey() ),
685 wfMsgHtml( 'contributions' )
689 function emailUserLink() {
690 return Linker::linkKnown(
691 SpecialPage::getTitleFor( 'Emailuser', $this->getSkin()->getTitle()->getDBkey() ),
692 wfMsgHtml( 'emailuser' )
696 function watchPageLinksLink() {
697 global $wgOut;
699 if ( !$wgOut->isArticleRelated() ) {
700 return '(' . wfMsg( 'notanarticle' ) . ')';
701 } else {
702 return Linker::linkKnown(
703 SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
704 wfMsgHtml( 'recentchangeslinked-toolbox' )
709 function talkLink() {
710 $title = $this->getSkin()->getTitle();
711 if ( NS_SPECIAL == $title->getNamespace() ) {
712 # No discussion links for special pages
713 return '';
716 $linkOptions = array();
718 if ( $title->isTalkPage() ) {
719 $link = $title->getSubjectPage();
720 switch( $link->getNamespace() ) {
721 case NS_MAIN:
722 $text = wfMsg( 'articlepage' );
723 break;
724 case NS_USER:
725 $text = wfMsg( 'userpage' );
726 break;
727 case NS_PROJECT:
728 $text = wfMsg( 'projectpage' );
729 break;
730 case NS_FILE:
731 $text = wfMsg( 'imagepage' );
732 # Make link known if image exists, even if the desc. page doesn't.
733 if ( wfFindFile( $link ) )
734 $linkOptions[] = 'known';
735 break;
736 case NS_MEDIAWIKI:
737 $text = wfMsg( 'mediawikipage' );
738 break;
739 case NS_TEMPLATE:
740 $text = wfMsg( 'templatepage' );
741 break;
742 case NS_HELP:
743 $text = wfMsg( 'viewhelppage' );
744 break;
745 case NS_CATEGORY:
746 $text = wfMsg( 'categorypage' );
747 break;
748 default:
749 $text = wfMsg( 'articlepage' );
751 } else {
752 $link = $title->getTalkPage();
753 $text = wfMsg( 'talkpage' );
756 $s = Linker::link( $link, $text, array(), array(), $linkOptions );
758 return $s;
761 function commentLink() {
762 global $wgOut;
764 $title = $this->getSkin()->getTitle();
765 if ( $title->isSpecialPage() ) {
766 return '';
769 # __NEWSECTIONLINK___ changes behaviour here
770 # If it is present, the link points to this page, otherwise
771 # it points to the talk page
772 if ( !$title->isTalkPage() && !$wgOut->showNewSectionLink() ) {
773 $title = $title->getTalkPage();
776 return Linker::linkKnown(
777 $title,
778 wfMsg( 'postcomment' ),
779 array(),
780 array(
781 'action' => 'edit',
782 'section' => 'new'
787 function getUploadLink() {
788 global $wgUploadNavigationUrl;
790 if ( $wgUploadNavigationUrl ) {
791 # Using an empty class attribute to avoid automatic setting of "external" class
792 return Linker::makeExternalLink( $wgUploadNavigationUrl, wfMsgHtml( 'upload' ), false, null, array( 'class' => '' ) );
793 } else {
794 return Linker::linkKnown(
795 SpecialPage::getTitleFor( 'Upload' ),
796 wfMsgHtml( 'upload' )
801 function nameAndLogin() {
802 global $wgUser, $wgLang, $wgRequest;
804 $returnTo = $this->getSkin()->getTitle();
805 $ret = '';
807 if ( $wgUser->isAnon() ) {
808 if ( $this->getSkin()->showIPinHeader() ) {
809 $name = $wgRequest->getIP();
811 $talkLink = Linker::link( $wgUser->getTalkPage(),
812 $wgLang->getNsText( NS_TALK ) );
814 $ret .= "$name ($talkLink)";
815 } else {
816 $ret .= wfMsg( 'notloggedin' );
819 $query = array();
821 if ( !$returnTo->isSpecial( 'Userlogout' ) ) {
822 $query['returnto'] = $returnTo->getPrefixedDBkey();
825 $loginlink = $wgUser->isAllowed( 'createaccount' )
826 ? 'nav-login-createaccount'
827 : 'login';
828 $ret .= "\n<br />" . Linker::link(
829 SpecialPage::getTitleFor( 'Userlogin' ),
830 wfMsg( $loginlink ), array(), $query
832 } else {
833 $talkLink = Linker::link( $wgUser->getTalkPage(),
834 $wgLang->getNsText( NS_TALK ) );
836 $ret .= Linker::link( $wgUser->getUserPage(),
837 htmlspecialchars( $wgUser->getName() ) );
838 $ret .= " ($talkLink)<br />";
839 $ret .= $wgLang->pipeList( array(
840 Linker::link(
841 SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ),
842 array(), array( 'returnto' => $returnTo->getPrefixedDBkey() )
844 Linker::specialLink( 'Preferences' ),
845 ) );
848 $ret = $wgLang->pipeList( array(
849 $ret,
850 Linker::link(
851 Title::newFromText( wfMsgForContent( 'helppage' ) ),
852 wfMsg( 'help' )
854 ) );
856 return $ret;