Fixed spacing in actions/cache/filebackend/filerepo/job folder
[mediawiki.git] / includes / SkinLegacy.php
blobca4902484072537bd9e0ecf2e784632066142ee9
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 $s = $wgLang->pipeList( array(
223 '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
224 ) );
228 return $s;
232 * Compatibility for extensions adding functionality through tabs.
233 * Eventually these old skins should be replaced with SkinTemplate-based
234 * versions, sigh...
235 * @return string
236 * @todo Exterminate! ...that, and replace it with normal SkinTemplate stuff
238 function extensionTabLinks() {
239 $tabs = array();
240 $out = '';
241 $s = array();
242 wfRunHooks( 'SkinTemplateTabs', array( $this->getSkin(), &$tabs ) );
243 foreach ( $tabs as $tab ) {
244 $s[] = Xml::element( 'a',
245 array( 'href' => $tab['href'] ),
246 $tab['text'] );
249 if ( count( $s ) ) {
250 global $wgLang;
252 $out = wfMessage( 'pipe-separator' )->escaped();
253 $out .= $wgLang->pipeList( $s );
256 return $out;
259 function bottomLinks() {
260 global $wgOut, $wgUser;
261 $sep = wfMessage( 'pipe-separator' )->escaped() . "\n";
263 $s = '';
264 if ( $wgOut->isArticleRelated() ) {
265 $element[] = '<strong>' . $this->editThisPage() . '</strong>';
267 if ( $wgUser->isLoggedIn() ) {
268 $element[] = $this->watchThisPage();
271 $element[] = $this->talkLink();
272 $element[] = $this->historyLink();
273 $element[] = $this->whatLinksHere();
274 $element[] = $this->watchPageLinksLink();
276 $title = $this->getSkin()->getTitle();
278 if (
279 $title->getNamespace() == NS_USER ||
280 $title->getNamespace() == NS_USER_TALK
282 $id = User::idFromName( $title->getText() );
283 $ip = User::isIP( $title->getText() );
285 # Both anons and non-anons have contributions list
286 if ( $id || $ip ) {
287 $element[] = $this->userContribsLink();
290 if ( $this->getSkin()->showEmailUser( $id ) ) {
291 $element[] = $this->emailUserLink();
295 $s = implode( $element, $sep );
297 if ( $title->getArticleID() ) {
298 $s .= "\n<br />";
300 // Delete/protect/move links for privileged users
301 if ( $wgUser->isAllowed( 'delete' ) ) {
302 $s .= $this->deleteThisPage();
305 if ( $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
306 $s .= $sep . $this->protectThisPage();
309 if ( $wgUser->isAllowed( 'move' ) ) {
310 $s .= $sep . $this->moveThisPage();
314 $s .= "<br />\n" . $this->otherLanguages();
317 return $s;
320 function otherLanguages() {
321 global $wgOut, $wgLang, $wgHideInterlanguageLinks;
323 if ( $wgHideInterlanguageLinks ) {
324 return '';
327 $a = $wgOut->getLanguageLinks();
329 if ( 0 == count( $a ) ) {
330 return '';
333 $s = wfMessage( 'otherlanguages' )->text() . wfMessage( 'colon-separator' )->text();
334 $first = true;
336 if ( $wgLang->isRTL() ) {
337 $s .= '<span dir="ltr">';
340 foreach ( $a as $l ) {
341 if ( !$first ) {
342 $s .= wfMessage( 'pipe-separator' )->escaped();
345 $first = false;
347 $nt = Title::newFromText( $l );
348 $text = Language::fetchLanguageName( $nt->getInterwiki() );
350 $s .= Html::element( 'a',
351 array( 'href' => $nt->getFullURL(), 'title' => $nt->getText(), 'class' => "external" ),
352 $text == '' ? $l : $text );
355 if ( $wgLang->isRTL() ) {
356 $s .= '</span>';
359 return $s;
363 * Show a drop-down box of special pages
364 * @return string
366 function specialPagesList() {
367 global $wgScript;
369 $select = new XmlSelect( 'title' );
370 $pages = SpecialPageFactory::getUsablePages();
371 array_unshift( $pages, SpecialPageFactory::getPage( 'SpecialPages' ) );
372 foreach ( $pages as $obj ) {
373 $select->addOption( $obj->getDescription(),
374 $obj->getTitle()->getPrefixedDBkey() );
377 return Html::rawElement( 'form',
378 array( 'id' => 'specialpages', 'method' => 'get', 'action' => $wgScript ),
379 $select->getHTML() . Xml::submitButton( wfMessage( 'go' )->text() ) );
382 function pageTitleLinks() {
383 global $wgOut, $wgUser, $wgRequest, $wgLang;
385 $oldid = $wgRequest->getVal( 'oldid' );
386 $diff = $wgRequest->getVal( 'diff' );
387 $action = $wgRequest->getText( 'action' );
389 $skin = $this->getSkin();
390 $title = $skin->getTitle();
392 $s[] = $this->printableLink();
393 $disclaimer = $skin->disclaimerLink(); # may be empty
395 if ( $disclaimer ) {
396 $s[] = $disclaimer;
399 $privacy = $skin->privacyLink(); # may be empty too
401 if ( $privacy ) {
402 $s[] = $privacy;
405 if ( $wgOut->isArticleRelated() ) {
406 if ( $title->getNamespace() == NS_FILE ) {
407 $image = wfFindFile( $title );
409 if ( $image ) {
410 $href = $image->getURL();
411 $s[] = Html::element( 'a', array( 'href' => $href,
412 'title' => $href ), $title->getText() );
418 if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) {
419 $s[] .= Linker::linkKnown(
420 $title,
421 wfMessage( 'currentrev' )->text()
425 if ( $wgUser->getNewtalk() ) {
426 # do not show "You have new messages" text when we are viewing our
427 # own talk page
428 if ( !$title->equals( $wgUser->getTalkPage() ) ) {
429 $tl = Linker::linkKnown(
430 $wgUser->getTalkPage(),
431 wfMessage( 'newmessageslink' )->escaped(),
432 array(),
433 array( 'redirect' => 'no' )
436 $dl = Linker::linkKnown(
437 $wgUser->getTalkPage(),
438 wfMessage( 'newmessagesdifflink' )->escaped(),
439 array(),
440 array( 'diff' => 'cur' )
442 $s[] = '<strong>' . wfMessage( 'youhavenewmessages', $tl, $dl )->text() . '</strong>';
443 # disable caching
444 $wgOut->setSquidMaxage( 0 );
445 $wgOut->enableClientCache( false );
449 $undelete = $skin->getUndeleteLink();
451 if ( !empty( $undelete ) ) {
452 $s[] = $undelete;
455 return $wgLang->pipeList( $s );
459 * Gets the h1 element with the page title.
460 * @return string
462 function pageTitle() {
463 global $wgOut;
464 $s = '<h1 class="pagetitle"><span dir="auto">' . $wgOut->getPageTitle() . '</span></h1>';
465 return $s;
468 function pageSubtitle() {
469 global $wgOut;
471 $sub = $wgOut->getSubtitle();
473 if ( $sub == '' ) {
474 global $wgExtraSubtitle;
475 $sub = wfMessage( 'tagline' )->parse() . $wgExtraSubtitle;
478 $subpages = $this->getSkin()->subPageSubtitle();
479 $sub .= !empty( $subpages ) ? "</p><p class='subpages'>$subpages" : '';
480 $s = "<p class='subtitle'>{$sub}</p>\n";
482 return $s;
485 function printableLink() {
486 global $wgOut, $wgRequest, $wgLang;
488 $s = array();
490 if ( !$wgOut->isPrintable() ) {
491 $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalURL(
492 $wgRequest->appendQueryValue( 'printable', 'yes', true ) ) );
493 $s[] = "<a href=\"$printurl\" rel=\"alternate\">"
494 . wfMessage( 'printableversion' )->text() . '</a>';
497 if ( $wgOut->isSyndicated() ) {
498 foreach ( $wgOut->getSyndicationLinks() as $format => $link ) {
499 $feedurl = htmlspecialchars( $link );
500 $s[] = "<a href=\"$feedurl\" rel=\"alternate\" type=\"application/{$format}+xml\""
501 . " class=\"feedlink\">" . wfMessage( "feed-$format" )->escaped() . "</a>";
504 return $wgLang->pipeList( $s );
508 * @deprecated in 1.19
509 * @return string
511 function getQuickbarCompensator( $rows = 1 ) {
512 wfDeprecated( __METHOD__, '1.19' );
513 return "<td style='width: 152px;' rowspan='{$rows}'>&#160;</td>";
516 function editThisPage() {
517 global $wgOut;
519 if ( !$wgOut->isArticleRelated() ) {
520 $s = wfMessage( 'protectedpage' )->text();
521 } else {
522 $title = $this->getSkin()->getTitle();
523 if ( $title->quickUserCan( 'edit' ) && $title->exists() ) {
524 $t = wfMessage( 'editthispage' )->text();
525 } elseif ( $title->quickUserCan( 'create' ) && !$title->exists() ) {
526 $t = wfMessage( 'create-this-page' )->text();
527 } else {
528 $t = wfMessage( 'viewsource' )->text();
531 $s = Linker::linkKnown(
532 $title,
534 array(),
535 $this->getSkin()->editUrlOptions()
539 return $s;
542 function deleteThisPage() {
543 global $wgUser, $wgRequest;
545 $diff = $wgRequest->getVal( 'diff' );
546 $title = $this->getSkin()->getTitle();
548 if ( $title->getArticleID() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
549 $t = wfMessage( 'deletethispage' )->text();
551 $s = Linker::linkKnown(
552 $title,
554 array(),
555 array( 'action' => 'delete' )
557 } else {
558 $s = '';
561 return $s;
564 function protectThisPage() {
565 global $wgUser, $wgRequest;
567 $diff = $wgRequest->getVal( 'diff' );
568 $title = $this->getSkin()->getTitle();
570 if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
571 if ( $title->isProtected() ) {
572 $text = wfMessage( 'unprotectthispage' )->text();
573 $query = array( 'action' => 'unprotect' );
574 } else {
575 $text = wfMessage( 'protectthispage' )->text();
576 $query = array( 'action' => 'protect' );
579 $s = Linker::linkKnown(
580 $title,
581 $text,
582 array(),
583 $query
585 } else {
586 $s = '';
589 return $s;
592 function watchThisPage() {
593 global $wgOut, $wgUser;
594 ++$this->mWatchLinkNum;
596 // Cache
597 $title = $this->getSkin()->getTitle();
599 if ( $wgOut->isArticleRelated() ) {
600 if ( $wgUser->isWatched( $title ) ) {
601 $text = wfMessage( 'unwatchthispage' )->text();
602 $query = array(
603 'action' => 'unwatch',
604 'token' => UnwatchAction::getUnwatchToken( $title, $wgUser ),
606 $id = 'mw-unwatch-link' . $this->mWatchLinkNum;
607 } else {
608 $text = wfMessage( 'watchthispage' )->text();
609 $query = array(
610 'action' => 'watch',
611 'token' => WatchAction::getWatchToken( $title, $wgUser ),
613 $id = 'mw-watch-link' . $this->mWatchLinkNum;
616 $s = Linker::linkKnown(
617 $title,
618 $text,
619 array( 'id' => $id ),
620 $query
622 } else {
623 $s = wfMessage( 'notanarticle' )->text();
626 return $s;
629 function moveThisPage() {
630 if ( $this->getSkin()->getTitle()->quickUserCan( 'move' ) ) {
631 return Linker::linkKnown(
632 SpecialPage::getTitleFor( 'Movepage' ),
633 wfMessage( 'movethispage' )->text(),
634 array(),
635 array( 'target' => $this->getSkin()->getTitle()->getPrefixedDBkey() )
637 } else {
638 // no message if page is protected - would be redundant
639 return '';
643 function historyLink() {
644 return Linker::link(
645 $this->getSkin()->getTitle(),
646 wfMessage( 'history' )->escaped(),
647 array( 'rel' => 'archives' ),
648 array( 'action' => 'history' )
652 function whatLinksHere() {
653 return Linker::linkKnown(
654 SpecialPage::getTitleFor( 'Whatlinkshere', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
655 wfMessage( 'whatlinkshere' )->escaped()
659 function userContribsLink() {
660 return Linker::linkKnown(
661 SpecialPage::getTitleFor( 'Contributions', $this->getSkin()->getTitle()->getDBkey() ),
662 wfMessage( 'contributions' )->escaped()
666 function emailUserLink() {
667 return Linker::linkKnown(
668 SpecialPage::getTitleFor( 'Emailuser', $this->getSkin()->getTitle()->getDBkey() ),
669 wfMessage( 'emailuser' )->escaped()
673 function watchPageLinksLink() {
674 global $wgOut;
676 if ( !$wgOut->isArticleRelated() ) {
677 return wfMessage( 'parentheses', wfMessage( 'notanarticle' )->text() )->escaped();
678 } else {
679 return Linker::linkKnown(
680 SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
681 wfMessage( 'recentchangeslinked-toolbox' )->escaped()
686 function talkLink() {
687 $title = $this->getSkin()->getTitle();
688 if ( NS_SPECIAL == $title->getNamespace() ) {
689 # No discussion links for special pages
690 return '';
693 $linkOptions = array();
695 if ( $title->isTalkPage() ) {
696 $link = $title->getSubjectPage();
697 switch( $link->getNamespace() ) {
698 case NS_MAIN:
699 $text = wfMessage( 'articlepage' );
700 break;
701 case NS_USER:
702 $text = wfMessage( 'userpage' );
703 break;
704 case NS_PROJECT:
705 $text = wfMessage( 'projectpage' );
706 break;
707 case NS_FILE:
708 $text = wfMessage( 'imagepage' );
709 # Make link known if image exists, even if the desc. page doesn't.
710 if ( wfFindFile( $link ) )
711 $linkOptions[] = 'known';
712 break;
713 case NS_MEDIAWIKI:
714 $text = wfMessage( 'mediawikipage' );
715 break;
716 case NS_TEMPLATE:
717 $text = wfMessage( 'templatepage' );
718 break;
719 case NS_HELP:
720 $text = wfMessage( 'viewhelppage' );
721 break;
722 case NS_CATEGORY:
723 $text = wfMessage( 'categorypage' );
724 break;
725 default:
726 $text = wfMessage( 'articlepage' );
728 } else {
729 $link = $title->getTalkPage();
730 $text = wfMessage( 'talkpage' );
733 $s = Linker::link( $link, $text->text(), array(), array(), $linkOptions );
735 return $s;
738 function commentLink() {
739 global $wgOut;
741 $title = $this->getSkin()->getTitle();
742 if ( $title->isSpecialPage() ) {
743 return '';
746 # __NEWSECTIONLINK___ changes behavior here
747 # If it is present, the link points to this page, otherwise
748 # it points to the talk page
749 if ( !$title->isTalkPage() && !$wgOut->showNewSectionLink() ) {
750 $title = $title->getTalkPage();
753 return Linker::linkKnown(
754 $title,
755 wfMessage( 'postcomment' )->text(),
756 array(),
757 array(
758 'action' => 'edit',
759 'section' => 'new'
764 function getUploadLink() {
765 global $wgUploadNavigationUrl;
767 if ( $wgUploadNavigationUrl ) {
768 # Using an empty class attribute to avoid automatic setting of "external" class
769 return Linker::makeExternalLink( $wgUploadNavigationUrl,
770 wfMessage( 'upload' )->escaped(),
771 false, null, array( 'class' => '' ) );
772 } else {
773 return Linker::linkKnown(
774 SpecialPage::getTitleFor( 'Upload' ),
775 wfMessage( 'upload' )->escaped()
780 function nameAndLogin() {
781 global $wgUser, $wgLang, $wgRequest;
783 $returnTo = $this->getSkin()->getTitle();
784 $ret = '';
786 if ( $wgUser->isAnon() ) {
787 if ( $this->getSkin()->showIPinHeader() ) {
788 $name = $wgRequest->getIP();
790 $talkLink = Linker::link( $wgUser->getTalkPage(),
791 $wgLang->getNsText( NS_TALK ) );
792 $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
794 $ret .= "$name $talkLink";
795 } else {
796 $ret .= wfMessage( 'notloggedin' )->text();
799 $query = array();
801 if ( !$returnTo->isSpecial( 'Userlogout' ) ) {
802 $query['returnto'] = $returnTo->getPrefixedDBkey();
805 $loginlink = $wgUser->isAllowed( 'createaccount' )
806 ? 'nav-login-createaccount'
807 : 'login';
808 $ret .= "\n<br />" . Linker::link(
809 SpecialPage::getTitleFor( 'Userlogin' ),
810 wfMessage( $loginlink )->text(), array(), $query
812 } else {
813 $talkLink = Linker::link( $wgUser->getTalkPage(),
814 $wgLang->getNsText( NS_TALK ) );
815 $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
817 $ret .= Linker::link( $wgUser->getUserPage(),
818 htmlspecialchars( $wgUser->getName() ) );
819 $ret .= " $talkLink<br />";
820 $ret .= $wgLang->pipeList( array(
821 Linker::link(
822 SpecialPage::getTitleFor( 'Userlogout' ), wfMessage( 'logout' )->text(),
823 array(), array( 'returnto' => $returnTo->getPrefixedDBkey() )
825 Linker::specialLink( 'Preferences' ),
826 ) );
829 $ret = $wgLang->pipeList( array(
830 $ret,
831 Linker::link(
832 Title::newFromText( wfMessage( 'helppage' )->inContentLanguage()->text() ),
833 wfMessage( 'help' )->text()
835 ) );
837 return $ret;