Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | 'addMobileFooter' ); |
53 | 53 | |
54 | 54 | class ExtMobileFrontend { |
55 | | - const VERSION = '0.5.4'; |
| 55 | + const VERSION = '0.5.5'; |
56 | 56 | |
57 | 57 | private $doc; |
58 | 58 | |
— | — | @@ -156,7 +156,13 @@ |
157 | 157 | $wurflManager = $wurflManagerFactory->create(); |
158 | 158 | $device = $wurflManager->getDeviceForHttpRequest( $_SERVER ); |
159 | 159 | $props = $device->getAllCapabilities(); |
160 | | - $wgMemc->set( $key, $props, 86400 ); |
| 160 | + |
| 161 | + if ( $device->isSpecific() === true ) { |
| 162 | + $wgMemc->set( $key, $props, 86400 ); |
| 163 | + } else { |
| 164 | + $wgMemc->set( $key, "generic", 86400 ); |
| 165 | + $props = "generic"; |
| 166 | + } |
161 | 167 | } |
162 | 168 | } catch (Exception $e) { |
163 | 169 | //echo $e->getMessage(); |
— | — | @@ -197,7 +203,8 @@ |
198 | 204 | } |
199 | 205 | } |
200 | 206 | |
201 | | - if ( $mAction != 'view_normal_site' && |
| 207 | + if ( is_array($props) && |
| 208 | + $mAction != 'view_normal_site' && |
202 | 209 | $props['is_wireless_device'] === 'true' && |
203 | 210 | $props['is_tablet'] === 'false' ) { |
204 | 211 | ob_start( array( $this, 'DOMParse' ) ); |