Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' ); |
51 | 51 | |
52 | 52 | class ExtMobileFrontend { |
53 | | - const VERSION = '0.5.21'; |
| 53 | + const VERSION = '0.5.22'; |
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @var DOMDocument |
— | — | @@ -131,29 +131,31 @@ |
132 | 132 | $copyright = $skin->getCopyright(); |
133 | 133 | // Need to stash the results of the "wfMsg" call before the Output Buffering handler |
134 | 134 | // because at this point the database connection is shut down, etc. |
135 | | - self::$messages['mobile-frontend-show'] = wfMsg( 'mobile-frontend-show-button' ); |
136 | | - self::$messages['mobile-frontend-hide'] = wfMsg( 'mobile-frontend-hide-button' ); |
137 | | - self::$messages['mobile-frontend-back-to-top'] = wfMsg( 'mobile-frontend-back-to-top-of-section' ); |
138 | | - self::$messages['mobile-frontend-regular-site'] = wfMsg( 'mobile-frontend-regular-site' ); |
139 | | - self::$messages['mobile-frontend-perm-stop-redirect'] = wfMsg( 'mobile-frontend-perm-stop-redirect' ); |
140 | | - self::$messages['mobile-frontend-copyright'] = $copyright; |
141 | | - self::$messages['mobile-frontend-home-button'] = wfMsg( 'mobile-frontend-home-button' ); |
142 | | - self::$messages['mobile-frontend-random-button'] = wfMsg( 'mobile-frontend-random-button' ); |
143 | | - self::$messages['mobile-frontend-are-you-sure'] = wfMsg( 'mobile-frontend-are-you-sure' ); |
144 | | - self::$messages['mobile-frontend-explain-disable'] = wfMsg( 'mobile-frontend-explain-disable' ); |
145 | | - self::$messages['mobile-frontend-disable-button'] = wfMsg( 'mobile-frontend-disable-button' ); |
146 | | - self::$messages['mobile-frontend-back-button'] = wfMsg( 'mobile-frontend-back-button' ); |
147 | | - self::$messages['mobile-frontend-opt-in-message'] = wfMsg( 'mobile-frontend-opt-in-message' ); |
148 | | - self::$messages['mobile-frontend-opt-in-yes-button'] = wfMsg( 'mobile-frontend-opt-in-yes-button' ); |
149 | | - self::$messages['mobile-frontend-opt-in-no-button'] = wfMsg( 'mobile-frontend-opt-in-no-button' ); |
150 | | - self::$messages['mobile-frontend-opt-in-title'] = wfMsg( 'mobile-frontend-opt-in-title' ); |
151 | | - self::$messages['mobile-frontend-opt-out-message'] = wfMsg( 'mobile-frontend-opt-out-message' ); |
152 | | - self::$messages['mobile-frontend-opt-out-yes-button'] = wfMsg( 'mobile-frontend-opt-out-yes-button' ); |
153 | | - self::$messages['mobile-frontend-opt-out-no-button'] = wfMsg( 'mobile-frontend-opt-out-no-button' ); |
154 | | - self::$messages['mobile-frontend-opt-out-title'] = wfMsg( 'mobile-frontend-opt-out-title' ); |
155 | | - self::$messages['mobile-frontend-opt-in-explain'] = wfMsg( 'mobile-frontend-opt-in-explain' ); |
156 | | - self::$messages['mobile-frontend-opt-out-explain'] = wfMsg( 'mobile-frontend-opt-out-explain' ); |
157 | | - self::$messages['mobile-frontend-disable-images'] = wfMsg( 'mobile-frontend-disable-images' ); |
| 135 | + self::$messages['mobile-frontend-show'] = wfMsg( 'mobile-frontend-show-button' ); |
| 136 | + self::$messages['mobile-frontend-hide'] = wfMsg( 'mobile-frontend-hide-button' ); |
| 137 | + self::$messages['mobile-frontend-back-to-top'] = wfMsg( 'mobile-frontend-back-to-top-of-section' ); |
| 138 | + self::$messages['mobile-frontend-regular-site'] = wfMsg( 'mobile-frontend-regular-site' ); |
| 139 | + self::$messages['mobile-frontend-perm-stop-redirect'] = wfMsg( 'mobile-frontend-perm-stop-redirect' ); |
| 140 | + self::$messages['mobile-frontend-copyright'] = $copyright; |
| 141 | + self::$messages['mobile-frontend-home-button'] = wfMsg( 'mobile-frontend-home-button' ); |
| 142 | + self::$messages['mobile-frontend-random-button'] = wfMsg( 'mobile-frontend-random-button' ); |
| 143 | + self::$messages['mobile-frontend-are-you-sure'] = wfMsg( 'mobile-frontend-are-you-sure' ); |
| 144 | + self::$messages['mobile-frontend-explain-disable'] = wfMsg( 'mobile-frontend-explain-disable' ); |
| 145 | + self::$messages['mobile-frontend-disable-button'] = wfMsg( 'mobile-frontend-disable-button' ); |
| 146 | + self::$messages['mobile-frontend-back-button'] = wfMsg( 'mobile-frontend-back-button' ); |
| 147 | + self::$messages['mobile-frontend-opt-in-message'] = wfMsg( 'mobile-frontend-opt-in-message' ); |
| 148 | + self::$messages['mobile-frontend-opt-in-yes-button'] = wfMsg( 'mobile-frontend-opt-in-yes-button' ); |
| 149 | + self::$messages['mobile-frontend-opt-in-no-button'] = wfMsg( 'mobile-frontend-opt-in-no-button' ); |
| 150 | + self::$messages['mobile-frontend-opt-in-title'] = wfMsg( 'mobile-frontend-opt-in-title' ); |
| 151 | + self::$messages['mobile-frontend-opt-out-message'] = wfMsg( 'mobile-frontend-opt-out-message' ); |
| 152 | + self::$messages['mobile-frontend-opt-out-yes-button'] = wfMsg( 'mobile-frontend-opt-out-yes-button' ); |
| 153 | + self::$messages['mobile-frontend-opt-out-no-button'] = wfMsg( 'mobile-frontend-opt-out-no-button' ); |
| 154 | + self::$messages['mobile-frontend-opt-out-title'] = wfMsg( 'mobile-frontend-opt-out-title' ); |
| 155 | + self::$messages['mobile-frontend-opt-in-explain'] = wfMsg( 'mobile-frontend-opt-in-explain' ); |
| 156 | + self::$messages['mobile-frontend-opt-out-explain'] = wfMsg( 'mobile-frontend-opt-out-explain' ); |
| 157 | + self::$messages['mobile-frontend-disable-images'] = wfMsg( 'mobile-frontend-disable-images' ); |
| 158 | + self::$messages['mobile-frontend-wml-continue'] = wfMsg( 'mobile-frontend-wml-continue' ); |
| 159 | + self::$messages['mobile-frontend-wml-back'] = wfMsg( 'mobile-frontend-wml-back' ); |
158 | 160 | |
159 | 161 | self::$dir = $wgContLang->getDir(); |
160 | 162 | self::$code = $wgContLang->getCode(); |
— | — | @@ -265,6 +267,7 @@ |
266 | 268 | |
267 | 269 | if ( $mAction == 'opt_in_cookie' ) { |
268 | 270 | $this->setOptInOutCookie( '1' ); |
| 271 | + $this->disableCaching(); |
269 | 272 | $location = Title::newMainPage()->getFullURL(); |
270 | 273 | header( 'Location: ' . $location ); |
271 | 274 | } |
— | — | @@ -438,10 +441,10 @@ |
439 | 442 | private function headingTransformCallbackWML( $matches ) { |
440 | 443 | static $headings = 0; |
441 | 444 | ++$headings; |
| 445 | + |
| 446 | + $base = $this->WMLSectionSeperator . |
| 447 | + "<h2 class='section_heading' id='section_{$headings}'>{$matches[2]}</h2>"; |
442 | 448 | |
443 | | - $base = $this->WMLSectionSeperator . |
444 | | - "<h2 class='section_heading' id='section_{$headings}'>{$matches[2]}</h2>"; |
445 | | - |
446 | 449 | self::$headings = $headings; |
447 | 450 | |
448 | 451 | return $base; |
— | — | @@ -526,12 +529,12 @@ |
527 | 530 | $basePage = htmlspecialchars( $_SERVER['PHP_SELF'] ); |
528 | 531 | |
529 | 532 | if ( $idx < $segmentsCount ) { |
530 | | - $card .= "<p><a href=\"{$basePage}?seg={$idx}{$useFormatParam}\">" . wfMsg( 'mobile-frontend-wml-continue' ) . "</a></p>"; |
| 533 | + $card .= "<p><a href=\"{$basePage}?seg={$idx}{$useFormatParam}\">" . self::$messages['mobile-frontend-wml-continue'] . "</a></p>"; |
531 | 534 | } |
532 | 535 | |
533 | 536 | if ( $idx > 1 ) { |
534 | 537 | $back_idx = $requestedSegment - 1; |
535 | | - $card .= "<p><a href=\"{$basePage}?seg={$back_idx}{$useFormatParam}\">" . wfMsg( 'mobile-frontend-wml-back' ) . "</a></p>"; |
| 538 | + $card .= "<p><a href=\"{$basePage}?seg={$back_idx}{$useFormatParam}\">" . self::$messages['mobile-frontend-wml-back'] . "</a></p>"; |
536 | 539 | } |
537 | 540 | |
538 | 541 | $card .= '</card>'; |