public static function getInstance() { if (empty(self::$mInstance)) { self::$mInstance = new MobileService(); } return self::$mInstance; }
function initPage( OutputPage $out ) { global $wgRequest, $wgCookiePrefix; //this will force the skin after the first visit, only for selected mobile platforms if( empty( $_COOKIE[ $wgCookiePrefix . self::COOKIE_NAME ] ) ) { $mobServ = MobileService::getInstance(); if ( $mobServ->isMobile() ) { $wgRequest->response()->setcookie( self::COOKIE_NAME, 1, time() + self::COOKIE_DURATION ); } } SkinTemplate::initPage( $out ); $out->addMeta("viewport", "width=320"); }