r80241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80240‎ | r80241 | r80242 >
Date:09:28, 14 January 2011
Author:dantman
Status:ok
Tags:
Comment:
Fix r79383, I used Message->plain() under the impression it was the proper replacement for wfMsg when Message->text() was actually the correct method to use.
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -714,7 +714,7 @@
715715 $message = end($message);
716716 }
717717 if ( $msg->exists() ) {
718 - $text = $msg->plain();
 718+ $text = $msg->text();
719719 } else {
720720 global $wgContLang;
721721 $text = $wgContLang->getFormattedNsText( MWNamespace::getSubject( $title->getNamespace() ) );
@@ -885,7 +885,7 @@
886886 "edit" : "create";
887887 $content_navigation['views']['edit'] = array(
888888 'class' => ( $selected ? 'selected' : '' ) . $isTalkClass,
889 - 'text' => wfMessageFallback( "$skname-view-$msgKey", $msgKey )->plain(),
 889+ 'text' => wfMessageFallback( "$skname-view-$msgKey", $msgKey )->text(),
890890 'href' => $title->getLocalURL( $this->editUrlOptions() ),
891891 'primary' => true, // don't collapse this in vector
892892 );
@@ -898,7 +898,7 @@
899899 //$content_navigation['actions']['addsection']
900900 $content_navigation['views']['addsection'] = array(
901901 'class' => $section == 'new' ? 'selected' : false,
902 - 'text' => wfMessageFallback( "$skname-action-addsection", 'addsection' )->plain(),
 902+ 'text' => wfMessageFallback( "$skname-action-addsection", 'addsection' )->text(),
903903 'href' => $title->getLocalURL( 'action=edit&section=new' )
904904 );
905905 }
@@ -908,7 +908,7 @@
909909 // Adds view source view link
910910 $content_navigation['views']['viewsource'] = array(
911911 'class' => ( $onPage && $action == 'edit' ) ? 'selected' : false,
912 - 'text' => wfMessageFallback( "$skname-action-viewsource", 'viewsource' )->plain(),
 912+ 'text' => wfMessageFallback( "$skname-action-viewsource", 'viewsource' )->text(),
913913 'href' => $title->getLocalURL( $this->editUrlOptions() ),
914914 'primary' => true, // don't collapse this in vector
915915 );
@@ -922,7 +922,7 @@
923923 // Adds history view link
924924 $content_navigation['views']['history'] = array(
925925 'class' => ( $onPage && $action == 'history' ) ? 'selected' : false,
926 - 'text' => wfMessageFallback( "$skname-view-history", 'history_short' )->plain(),
 926+ 'text' => wfMessageFallback( "$skname-view-history", 'history_short' )->text(),
927927 'href' => $title->getLocalURL( 'action=history' ),
928928 'rel' => 'archives',
929929 );
@@ -930,7 +930,7 @@
931931 if( $wgUser->isAllowed( 'delete' ) ) {
932932 $content_navigation['actions']['delete'] = array(
933933 'class' => ( $onPage && $action == 'delete' ) ? 'selected' : false,
934 - 'text' => wfMessageFallback( "$skname-action-delete", 'delete' )->plain(),
 934+ 'text' => wfMessageFallback( "$skname-action-delete", 'delete' )->text(),
935935 'href' => $title->getLocalURL( 'action=delete' )
936936 );
937937 }
@@ -938,7 +938,7 @@
939939 $moveTitle = SpecialPage::getTitleFor( 'Movepage', $title->getPrefixedDBkey() );
940940 $content_navigation['actions']['move'] = array(
941941 'class' => $this->mTitle->isSpecial( 'Movepage' ) ? 'selected' : false,
942 - 'text' => wfMessageFallback( "$skname-action-move", 'move' )->plain(),
 942+ 'text' => wfMessageFallback( "$skname-action-move", 'move' )->text(),
943943 'href' => $moveTitle->getLocalURL()
944944 );
945945 }
@@ -947,7 +947,7 @@
948948 $mode = !$title->isProtected() ? 'protect' : 'unprotect';
949949 $content_navigation['actions'][$mode] = array(
950950 'class' => ( $onPage && $action == $mode ) ? 'selected' : false,
951 - 'text' => wfMessageFallback( "$skname-action-$mode", $mode )->plain(),
 951+ 'text' => wfMessageFallback( "$skname-action-$mode", $mode )->text(),
952952 'href' => $title->getLocalURL( "action=$mode" )
953953 );
954954 }
@@ -972,7 +972,7 @@
973973 $mode = !$title->getRestrictions( 'create' ) ? 'protect' : 'unprotect';
974974 $content_navigation['actions'][$mode] = array(
975975 'class' => ( $onPage && $action == $mode ) ? 'selected' : false,
976 - 'text' => wfMessageFallback( "$skname-action-$mode", $mode )->plain(),
 976+ 'text' => wfMessageFallback( "$skname-action-$mode", $mode )->text(),
977977 'href' => $title->getLocalURL( "action=$mode" )
978978 );
979979 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79383Merging Vector's navigation_urls and SkinTemplate's content_actions code into...dantman23:30, 31 December 2010

Status & tagging log