Index: trunk/extensions/MobileFrontend/MobileFrontend.i18n.php |
— | — | @@ -67,6 +67,7 @@ |
68 | 68 | 'mobile-frontend-leave-feedback-link-text' => 'MobileFrontend Extension feedback', |
69 | 69 | 'mobile-frontend-leave-feedback' => 'Mobile site feedback', |
70 | 70 | 'mobile-frontend-feedback-page' => 'Project:Mobile Extension Feedback', |
| 71 | + 'mobile-frontend-leave-feedback-thanks' => 'Thanks, for your feedback!', |
71 | 72 | ); |
72 | 73 | |
73 | 74 | /** Message documentation (Message documentation) |
Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | ); |
67 | 67 | |
68 | 68 | class ExtMobileFrontend { |
69 | | - const VERSION = '0.5.57'; |
| 69 | + const VERSION = '0.5.58'; |
70 | 70 | |
71 | 71 | /** |
72 | 72 | * @var DOMDocument |
— | — | @@ -103,6 +103,7 @@ |
104 | 104 | public static $disableMobileSiteURL; |
105 | 105 | public static $viewNormalSiteURL; |
106 | 106 | public static $currentURL; |
| 107 | + public static $displayNoticeId; |
107 | 108 | |
108 | 109 | public static $messageKeys = array( |
109 | 110 | 'mobile-frontend-show-button', |
— | — | @@ -141,6 +142,7 @@ |
142 | 143 | 'mobile-frontend-leave-feedback-link-text', |
143 | 144 | 'mobile-frontend-leave-feedback', |
144 | 145 | 'mobile-frontend-feedback-page', |
| 146 | + 'mobile-frontend-leave-feedback-thanks', |
145 | 147 | ); |
146 | 148 | |
147 | 149 | public $itemsToRemove = array( |
— | — | @@ -280,6 +282,7 @@ |
281 | 283 | $action = $wgRequest->getText( 'action' ); |
282 | 284 | self::$disableImages = $wgRequest->getText( 'disableImages', 0 ); |
283 | 285 | self::$enableImages = $wgRequest->getText( 'enableImages', 0 ); |
| 286 | + self::$displayNoticeId = $wgRequest->getText( 'noticeid', '' ); |
284 | 287 | |
285 | 288 | if ( self::$disableImages == 1 ) { |
286 | 289 | $wgRequest->response()->setcookie( 'disableImages', 1 ); |
— | — | @@ -360,7 +363,7 @@ |
361 | 364 | $article->doEdit( $rawtext, '' ); |
362 | 365 | } |
363 | 366 | |
364 | | - $location = str_replace( '&mobileaction=leave_feedback_post', '', $wgRequest->getFullRequestURL() ); |
| 367 | + $location = str_replace( '&mobileaction=leave_feedback_post', '', $wgRequest->getFullRequestURL() . '¬iceid=1' ); |
365 | 368 | $wgRequest->response()->header( 'Location: ' . $location ); |
366 | 369 | wfProfileOut( __METHOD__ ); |
367 | 370 | exit(); |
— | — | @@ -494,6 +497,7 @@ |
495 | 498 | $this->getMsg(); |
496 | 499 | $editToken = $wgUser->editToken(); |
497 | 500 | |
| 501 | + $htmlTitle = self::$messages['mobile-frontend-leave-feedback']; |
498 | 502 | $title = self::$messages['mobile-frontend-leave-feedback-title']; |
499 | 503 | $notice = self::$messages['mobile-frontend-leave-feedback-notice']; |
500 | 504 | $subject = self::$messages['mobile-frontend-leave-feedback-subject']; |
— | — | @@ -924,6 +928,13 @@ |
925 | 929 | } |
926 | 930 | |
927 | 931 | if ( $this->contentFormat == 'XHTML' && self::$format != 'json' ) { |
| 932 | + if ( !empty( self::$displayNoticeId ) ) { |
| 933 | + $noticePagePath = 'views/notices/notice_' . intval( self::$displayNoticeId ) . '.html.php'; |
| 934 | + if ( file_exists( dirname(__FILE__) . '/' . $noticePagePath ) ) { |
| 935 | + require( $noticePagePath ); |
| 936 | + } |
| 937 | + } |
| 938 | + |
928 | 939 | //header( 'Content-Type: application/xhtml+xml; charset=utf-8' ); |
929 | 940 | require( 'views/layout/_search_webkit.html.php' ); |
930 | 941 | require( 'views/layout/_footmenu_default.html.php' ); |
Index: trunk/extensions/MobileFrontend/views/notices/notice_1.html.php |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$thanks = self::$messages['mobile-frontend-leave-feedback-thanks']; |
| 5 | + |
| 6 | +$noticeHtml = <<<EOT |
| 7 | + <div class='mwm-message mwm-notice'> |
| 8 | + {$thanks} |
| 9 | + </div> |
| 10 | +EOT; |
Property changes on: trunk/extensions/MobileFrontend/views/notices/notice_1.html.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 11 | + native |
Index: trunk/extensions/MobileFrontend/views/layout/application.html.php |
— | — | @@ -10,6 +10,8 @@ |
11 | 11 | $appleTouchIconTag = ""; |
12 | 12 | } |
13 | 13 | |
| 14 | +$noticeHtml = empty( $noticeHtml ) ? '' : $noticeHtml; |
| 15 | + |
14 | 16 | $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
15 | 17 | |
16 | 18 | $applicationHtml = <<<EOT |
— | — | @@ -38,6 +40,7 @@ |
39 | 41 | <body> |
40 | 42 | {$searchWebkitHtml} |
41 | 43 | <div class='show' id='content_wrapper'> |
| 44 | + {$noticeHtml} |
42 | 45 | {$contentHtml} |
43 | 46 | </div> |
44 | 47 | {$footerHtml} |