Esempio n. 1
0
 public static function getInstance()
 {
     if (empty(self::$mInstance)) {
         self::$mInstance = new MobileService();
     }
     return self::$mInstance;
 }
Esempio n. 2
0
	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");
	}