Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -235,10 +235,12 @@ |
236 | 236 | } |
237 | 237 | $s .= "\n<h6>" . htmlspecialchars( $h ) . "</h6>"; |
238 | 238 | } |
239 | | - foreach ( $browseLinks as $link ) { |
240 | | - if ( $link['text'] != '-' ) { |
241 | | - $s .= "<a href=\"{$link['href']}\">" . |
242 | | - htmlspecialchars( $link['text'] ) . '</a>' . $sep; |
| 239 | + if( is_array( $browseLinks ) ) { |
| 240 | + foreach ( $browseLinks as $link ) { |
| 241 | + if ( $link['text'] != '-' ) { |
| 242 | + $s .= "<a href=\"{$link['href']}\">" . |
| 243 | + htmlspecialchars( $link['text'] ) . '</a>' . $sep; |
| 244 | + } |
243 | 245 | } |
244 | 246 | } |
245 | 247 | $barnumber++; |
Index: trunk/phase3/includes/SkinLegacy.php |
— | — | @@ -252,7 +252,7 @@ |
253 | 253 | |
254 | 254 | $s = array( |
255 | 255 | $this->getSkin()->mainPageLink(), |
256 | | - $this->getSkin()->specialLink( 'Recentchanges' ) |
| 256 | + Linker::specialLink( 'Recentchanges' ) |
257 | 257 | ); |
258 | 258 | |
259 | 259 | if ( $wgOut->isArticleRelated() ) { |
— | — | @@ -505,7 +505,7 @@ |
506 | 506 | } |
507 | 507 | |
508 | 508 | if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) { |
509 | | - $s[] .= $this->getSkin()->link( |
| 509 | + $s[] .= Linker::link( |
510 | 510 | $this->getSkin()->getTitle(), |
511 | 511 | wfMsg( 'currentrev' ), |
512 | 512 | array(), |
— | — | @@ -518,7 +518,7 @@ |
519 | 519 | # do not show "You have new messages" text when we are viewing our |
520 | 520 | # own talk page |
521 | 521 | if ( !$this->getSkin()->getTitle()->equals( $wgUser->getTalkPage() ) ) { |
522 | | - $tl = $this->getSkin()->link( |
| 522 | + $tl = Linker::link( |
523 | 523 | $wgUser->getTalkPage(), |
524 | 524 | wfMsgHtml( 'newmessageslink' ), |
525 | 525 | array(), |
— | — | @@ -526,7 +526,7 @@ |
527 | 527 | array( 'known', 'noclasses' ) |
528 | 528 | ); |
529 | 529 | |
530 | | - $dl = $this->getSkin()->link( |
| 530 | + $dl = Linker::link( |
531 | 531 | $wgUser->getTalkPage(), |
532 | 532 | wfMsgHtml( 'newmessagesdifflink' ), |
533 | 533 | array(), |
— | — | @@ -615,7 +615,7 @@ |
616 | 616 | $t = wfMsg( 'viewsource' ); |
617 | 617 | } |
618 | 618 | |
619 | | - $s = $this->getSkin()->link( |
| 619 | + $s = Linker::link( |
620 | 620 | $this->getSkin()->getTitle(), |
621 | 621 | $t, |
622 | 622 | array(), |
— | — | @@ -635,7 +635,7 @@ |
636 | 636 | if ( $this->getSkin()->getTitle()->getArticleId() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) { |
637 | 637 | $t = wfMsg( 'deletethispage' ); |
638 | 638 | |
639 | | - $s = $this->getSkin()->link( |
| 639 | + $s = Linker::link( |
640 | 640 | $this->getSkin()->getTitle(), |
641 | 641 | $t, |
642 | 642 | array(), |
— | — | @@ -663,7 +663,7 @@ |
664 | 664 | $query = array( 'action' => 'protect' ); |
665 | 665 | } |
666 | 666 | |
667 | | - $s = $this->getSkin()->link( |
| 667 | + $s = Linker::link( |
668 | 668 | $this->getSkin()->getTitle(), |
669 | 669 | $text, |
670 | 670 | array(), |
— | — | @@ -701,7 +701,7 @@ |
702 | 702 | $id = 'mw-watch-link' . $this->mWatchLinkNum; |
703 | 703 | } |
704 | 704 | |
705 | | - $s = $this->getSkin()->link( |
| 705 | + $s = Linker::link( |
706 | 706 | $title, |
707 | 707 | $text, |
708 | 708 | array( 'id' => $id ), |
— | — | @@ -717,7 +717,7 @@ |
718 | 718 | |
719 | 719 | function moveThisPage() { |
720 | 720 | if ( $this->getSkin()->getTitle()->quickUserCan( 'move' ) ) { |
721 | | - return $this->getSkin()->link( |
| 721 | + return Linker::link( |
722 | 722 | SpecialPage::getTitleFor( 'Movepage' ), |
723 | 723 | wfMsg( 'movethispage' ), |
724 | 724 | array(), |
— | — | @@ -731,7 +731,7 @@ |
732 | 732 | } |
733 | 733 | |
734 | 734 | function historyLink() { |
735 | | - return $this->getSkin()->link( |
| 735 | + return Linker::link( |
736 | 736 | $this->getSkin()->getTitle(), |
737 | 737 | wfMsgHtml( 'history' ), |
738 | 738 | array( 'rel' => 'archives' ), |
— | — | @@ -740,7 +740,7 @@ |
741 | 741 | } |
742 | 742 | |
743 | 743 | function whatLinksHere() { |
744 | | - return $this->getSkin()->link( |
| 744 | + return Linker::link( |
745 | 745 | SpecialPage::getTitleFor( 'Whatlinkshere', $this->getSkin()->getTitle()->getPrefixedDBkey() ), |
746 | 746 | wfMsgHtml( 'whatlinkshere' ), |
747 | 747 | array(), |
— | — | @@ -750,7 +750,7 @@ |
751 | 751 | } |
752 | 752 | |
753 | 753 | function userContribsLink() { |
754 | | - return $this->getSkin()->link( |
| 754 | + return Linker::link( |
755 | 755 | SpecialPage::getTitleFor( 'Contributions', $this->getSkin()->getTitle()->getDBkey() ), |
756 | 756 | wfMsgHtml( 'contributions' ), |
757 | 757 | array(), |
— | — | @@ -760,7 +760,7 @@ |
761 | 761 | } |
762 | 762 | |
763 | 763 | function emailUserLink() { |
764 | | - return $this->getSkin()->link( |
| 764 | + return Linker::link( |
765 | 765 | SpecialPage::getTitleFor( 'Emailuser', $this->getSkin()->getTitle()->getDBkey() ), |
766 | 766 | wfMsg( 'emailuser' ), |
767 | 767 | array(), |
— | — | @@ -775,7 +775,7 @@ |
776 | 776 | if ( !$wgOut->isArticleRelated() ) { |
777 | 777 | return '(' . wfMsg( 'notanarticle' ) . ')'; |
778 | 778 | } else { |
779 | | - return $this->getSkin()->link( |
| 779 | + return Linker::link( |
780 | 780 | SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ), |
781 | 781 | wfMsg( 'recentchangeslinked-toolbox' ), |
782 | 782 | array(), |
— | — | @@ -836,7 +836,7 @@ |
837 | 837 | $text = wfMsg( 'talkpage' ); |
838 | 838 | } |
839 | 839 | |
840 | | - $s = $this->getSkin()->link( $link, $text, array(), array(), $linkOptions ); |
| 840 | + $s = Linker::link( $link, $text, array(), array(), $linkOptions ); |
841 | 841 | |
842 | 842 | return $s; |
843 | 843 | } |
— | — | @@ -859,7 +859,7 @@ |
860 | 860 | $title = $this->getSkin()->getTitle()->getTalkPage(); |
861 | 861 | } |
862 | 862 | |
863 | | - return $this->getSkin()->link( |
| 863 | + return Linker::link( |
864 | 864 | $title, |
865 | 865 | wfMsg( 'postcomment' ), |
866 | 866 | array(), |
— | — | @@ -876,9 +876,9 @@ |
877 | 877 | |
878 | 878 | if ( $wgUploadNavigationUrl ) { |
879 | 879 | # Using an empty class attribute to avoid automatic setting of "external" class |
880 | | - return $this->makeExternalLink( $wgUploadNavigationUrl, wfMsgHtml( 'upload' ), false, null, array( 'class' => '' ) ); |
| 880 | + return Linker::makeExternalLink( $wgUploadNavigationUrl, wfMsgHtml( 'upload' ), false, null, array( 'class' => '' ) ); |
881 | 881 | } else { |
882 | | - return $this->getSkin()->link( |
| 882 | + return Linker::link( |
883 | 883 | SpecialPage::getTitleFor( 'Upload' ), |
884 | 884 | wfMsgHtml( 'upload' ), |
885 | 885 | array(), |
— | — | @@ -899,7 +899,7 @@ |
900 | 900 | if ( $this->getSkin()->showIPinHeader() ) { |
901 | 901 | $name = wfGetIP(); |
902 | 902 | |
903 | | - $talkLink = $this->getSkin()->link( $wgUser->getTalkPage(), |
| 903 | + $talkLink = Linker::link( $wgUser->getTalkPage(), |
904 | 904 | $wgLang->getNsText( NS_TALK ) ); |
905 | 905 | |
906 | 906 | $ret .= "$name ($talkLink)"; |
— | — | @@ -917,30 +917,30 @@ |
918 | 918 | $loginlink = $wgUser->isAllowed( 'createaccount' ) |
919 | 919 | ? 'nav-login-createaccount' |
920 | 920 | : 'login'; |
921 | | - $ret .= "\n<br />" . $this->getSkin()->link( |
| 921 | + $ret .= "\n<br />" . Linker::link( |
922 | 922 | SpecialPage::getTitleFor( 'Userlogin' ), |
923 | 923 | wfMsg( $loginlink ), array(), $query |
924 | 924 | ); |
925 | 925 | } else { |
926 | 926 | $returnTo = $this->getSkin()->getTitle()->getPrefixedDBkey(); |
927 | | - $talkLink = $this->getSkin()->link( $wgUser->getTalkPage(), |
| 927 | + $talkLink = Linker::link( $wgUser->getTalkPage(), |
928 | 928 | $wgLang->getNsText( NS_TALK ) ); |
929 | 929 | |
930 | | - $ret .= $this->getSkin()->link( $wgUser->getUserPage(), |
| 930 | + $ret .= Linker::link( $wgUser->getUserPage(), |
931 | 931 | htmlspecialchars( $wgUser->getName() ) ); |
932 | 932 | $ret .= " ($talkLink)<br />"; |
933 | 933 | $ret .= $wgLang->pipeList( array( |
934 | | - $this->getSkin()->link( |
| 934 | + Linker::link( |
935 | 935 | SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ), |
936 | 936 | array(), array( 'returnto' => $returnTo ) |
937 | 937 | ), |
938 | | - $this->getSkin()->specialLink( 'Preferences' ), |
| 938 | + Linker::specialLink( 'Preferences' ), |
939 | 939 | ) ); |
940 | 940 | } |
941 | 941 | |
942 | 942 | $ret = $wgLang->pipeList( array( |
943 | 943 | $ret, |
944 | | - $this->getSkin()->link( |
| 944 | + Linker::link( |
945 | 945 | Title::newFromText( wfMsgForContent( 'helppage' ) ), |
946 | 946 | wfMsg( 'help' ) |
947 | 947 | ), |