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.17'; |
| 53 | + const VERSION = '0.5.18'; |
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @var DOMDocument |
— | — | @@ -173,34 +173,6 @@ |
174 | 174 | self::$title = $out->getTitle(); |
175 | 175 | self::$htmlTitle = $out->getHTMLTitle(); |
176 | 176 | |
177 | | - // Need to get copyright footer from skin. The footer changes depending |
178 | | - // on whether we're using the WikimediaMessages extension or not. |
179 | | - //$skin = $wgUser->getSkin(); |
180 | | - //$copyright = $skin->getCopyright(); |
181 | | - |
182 | | - // Need to stash the results of the "wfMsg" call before the Output Buffering handler |
183 | | - // because at this point the database connection is shut down, etc. |
184 | | - //self::$messages['mobile-frontend-show'] = wfMsg( 'mobile-frontend-show-button' ); |
185 | | - //self::$messages['mobile-frontend-hide'] = wfMsg( 'mobile-frontend-hide-button' ); |
186 | | - //self::$messages['mobile-frontend-back-to-top'] = wfMsg( 'mobile-frontend-back-to-top-of-section' ); |
187 | | - //self::$messages['mobile-frontend-regular-site'] = wfMsg( 'mobile-frontend-regular-site' ); |
188 | | - //self::$messages['mobile-frontend-perm-stop-redirect'] = wfMsg( 'mobile-frontend-perm-stop-redirect' ); |
189 | | - //self::$messages['mobile-frontend-copyright'] = $copyright; |
190 | | - //self::$messages['mobile-frontend-home-button'] = wfMsg( 'mobile-frontend-home-button' ); |
191 | | - //self::$messages['mobile-frontend-random-button'] = wfMsg( 'mobile-frontend-random-button' ); |
192 | | - //self::$messages['mobile-frontend-are-you-sure'] = wfMsg( 'mobile-frontend-are-you-sure' ); |
193 | | - //self::$messages['mobile-frontend-explain-disable'] = wfMsg( 'mobile-frontend-explain-disable' ); |
194 | | - //self::$messages['mobile-frontend-disable-button'] = wfMsg( 'mobile-frontend-disable-button' ); |
195 | | - //self::$messages['mobile-frontend-back-button'] = wfMsg( 'mobile-frontend-back-button' ); |
196 | | - |
197 | | - //self::$dir = $wgContLang->getDir(); |
198 | | - //self::$code = $wgContLang->getCode(); |
199 | | - |
200 | | - self::$disableImages = $wgRequest->getText( 'disableImages', 0 ); |
201 | | - |
202 | | - //self::$mainPageUrl = Title::newMainPage()->getLocalUrl(); |
203 | | - //self::$randomPageUrl = SpecialPage::getTitleFor( 'Randompage' )->getLocalUrl(); |
204 | | - |
205 | 177 | $userAgent = $_SERVER['HTTP_USER_AGENT']; |
206 | 178 | $uAmd5 = md5($userAgent); |
207 | 179 | |
— | — | @@ -234,6 +206,8 @@ |
235 | 207 | // This is stated to be intended behavior, as per the following: [http://bugs.php.net/bug.php?id=40104] |
236 | 208 | |
237 | 209 | $mAction = $wgRequest->getText( 'mAction' ); |
| 210 | + $action = $wgRequest->getText( 'action' ); |
| 211 | + self::$disableImages = $wgRequest->getText( 'disableImages', 0 ); |
238 | 212 | self::$useFormat = $wgRequest->getText( 'useFormat' ); |
239 | 213 | self::$format = $wgRequest->getText( 'format' ); |
240 | 214 | self::$requestedSegment = $wgRequest->getText( 'seg', 0 ); |
— | — | @@ -325,9 +299,11 @@ |
326 | 300 | if (self::$useFormat === 'mobile' || |
327 | 301 | self::$useFormat === 'mobile-wap' || |
328 | 302 | !empty( $xDevice ) ) { |
329 | | - $this->getMsg(); |
330 | | - $this->disableCaching(); |
331 | | - ob_start( array( $this, 'DOMParse' ) ); |
| 303 | + if ( $action !== 'edit' ) { |
| 304 | + $this->getMsg(); |
| 305 | + $this->disableCaching(); |
| 306 | + ob_start( array( $this, 'DOMParse' ) ); |
| 307 | + } |
332 | 308 | } |
333 | 309 | |
334 | 310 | return true; |