Index: trunk/extensions/PatchOutputMobile/PatchOutputMobile.php |
— | — | @@ -27,13 +27,13 @@ |
28 | 28 | 'onOutputPageBeforeHTML' ); |
29 | 29 | |
30 | 30 | class ExtPatchOutputMobile { |
31 | | - const VERSION = '0.2.8'; |
| 31 | + const VERSION = '0.2.9'; |
32 | 32 | |
33 | 33 | private $doc; |
34 | 34 | |
35 | 35 | public static $messages = array(); |
36 | 36 | |
37 | | - public $contentFormat = 'XHTML'; //'WML' |
| 37 | + public $contentFormat = ''; |
38 | 38 | public $WMLSectionSeperator = '***************************************************************************'; |
39 | 39 | public static $dir; |
40 | 40 | public static $code; |
— | — | @@ -86,6 +86,12 @@ |
87 | 87 | $formatName = $device->formatName( $userAgent, $acceptHeader ); |
88 | 88 | ExtPatchOutputMobile::$device = $device->format( $formatName ); |
89 | 89 | |
| 90 | + if ( ExtPatchOutputMobile::$device['view_format'] === 'wml' ) { |
| 91 | + $this->contentFormat = 'WML'; |
| 92 | + } elseif ( ExtPatchOutputMobile::$device['view_format'] === 'html' ) { |
| 93 | + $this->contentFormat = 'XHTML'; |
| 94 | + } |
| 95 | + |
90 | 96 | ob_start( array( $this, 'parse' ) ); |
91 | 97 | return true; |
92 | 98 | } |
— | — | @@ -716,4 +722,4 @@ |
717 | 723 | } |
718 | 724 | return $formatName; |
719 | 725 | } |
720 | | -} |
\ No newline at end of file |
| 726 | +} |