r96371 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96370‎ | r96371 | r96372 >
Date:20:52, 6 September 2011
Author:preilly
Status:ok
Tags:
Comment:
fix for r96352
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.i18n.php (modified) (history)
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.i18n.php
@@ -66,6 +66,7 @@
6767 'mobile-frontend-leave-feedback-submit' => 'Submit Feedback',
6868 'mobile-frontend-leave-feedback-link-text' => 'Mobile Frontend feedback',
6969 'mobile-frontend-leave-feedback' => 'Leave feedback',
 70+ 'mobile-frontend-feedback-page' => 'Project:Mobile Extension Feedback',
7071 );
7172
7273 /** Message documentation (Message documentation)
Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -65,7 +65,7 @@
6666 );
6767
6868 class ExtMobileFrontend {
69 - const VERSION = '0.5.56';
 69+ const VERSION = '0.5.57';
7070
7171 /**
7272 * @var DOMDocument
@@ -140,6 +140,7 @@
141141 'mobile-frontend-leave-feedback-submit',
142142 'mobile-frontend-leave-feedback-link-text',
143143 'mobile-frontend-leave-feedback',
 144+ 'mobile-frontend-feedback-page',
144145 );
145146
146147 public $itemsToRemove = array(
@@ -209,7 +210,10 @@
210211
211212 if ( $messageKey == 'mobile-frontend-leave-feedback-notice' ) {
212213 $linkText = wfMsg( 'mobile-frontend-leave-feedback-link-text' );
213 - self::$messages[$messageKey] = wfMsg( $messageKey, Html::element( 'a', array( 'href' => Title::newFromText( 'MobileFrontend Extension Feedback' )->getFullURL(), 'target' => '_blank' ), $linkText ) );
 214+ $linkTarget = wfMsgNoTrans( 'mobile-frontend-feedback-page' );
 215+ self::$messages[$messageKey] = wfMsgExt( $messageKey, array( 'replaceafter' ), Html::element( 'a', array( 'href' => Title::newFromText( $linkTarget )->getFullURL(), 'target' => '_blank' ), $linkText ) );
 216+ } elseif ( $messageKey == 'mobile-frontend-feedback-page' ) {
 217+ self::$messages[$messageKey] = wfMsgNoTrans( $messageKey );
214218 } else {
215219 self::$messages[$messageKey] = wfMsg( $messageKey );
216220 }
@@ -339,11 +343,13 @@
340344
341345 if ( $mobileAction == 'leave_feedback_post' ) {
342346
 347+ $this->getMsg();
 348+
343349 $subject = $wgRequest->getText( 'subject', '' );
344350 $message = $wgRequest->getText( 'message', '' );
345351 $token = $wgRequest->getText( 'edittoken', '' );
346352
347 - $title = Title::newFromText( 'MobileFrontend Extension Feedback' );
 353+ $title = Title::newFromText( self::$messages['mobile-frontend-feedback-page'] );
348354
349355 if ( $title->userCan( 'edit' ) &&
350356 !$wgUser->isBlockedFrom( $title ) &&

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96352fix for r96167 title hackpreilly17:12, 6 September 2011

Status & tagging log