public static function getSkin($context, &$skin){

    //there's probably a better way to check for this...
    if(!isset($_GET['useskin'])){
      $key = $GLOBALS['wgDefaultSkin'];
      if( self::$pageSkin ){
        $key = new self::$pageSkin;
      }

      $key = \Skin::normalizeKey( $key );

      $skinNames = \Skin::getSkinNames();
      $skinName = $skinNames[$key];

      $className = "\Skin{$skinName}";
      if (class_exists($className)) {
        $skin = new $className();
        if (isset(self::$skinLayout) && method_exists($skin, 'setLayout')) {
          $skin->setLayout(self::$skinLayout);
        }
      }
    }
    self::$skin = $skin;

    return true;
  }
public static function getSkin($context, &$skin){

    //there's probably a better way to check for this...
    if(!isset($_GET['useskin'])){
      $key = $GLOBALS['wgDefaultSkin'];
      if( self::$pageSkin ){
        $key = new self::$pageSkin;
      }

      $key = \Skin::normalizeKey( $key );

      $skinNames = \Skin::getSkinNames();
      $skinName = $skinNames[$key];

      $className = "\Skin{$skinName}";
      if (class_exists($className)) {
        $skin = new $className();
        if (isset(self::$skinLayout) && method_exists($skin, 'setLayout')) {
          $skin->setLayout(self::$skinLayout);
        }
      }
    }
    self::$skin = $skin;

    return true;
  }
public static function getSkin ( $ context , & $ skin ) { //there's probably a better way to check for this... if ( ! isset ( $ _GET [ 'useskin' ] ) ) { $ key = $ GLOBALS [ 'wgDefaultSkin' ] ; if ( self :: $ pageSkin ) { $ key = new self :: $ pageSkin ; } $ key = \ Skin :: normalizeKey ( $ key ) ; $ skinNames = \ Skin :: getSkinNames ( ) ; $ skinName = $ skinNames [ $ key ] ; $ className = "\Skin{$skinName}" ; if ( class_exists ( $ className ) ) { $ skin = new $ className ( ) ; if ( isset ( self :: $ skinLayout ) && method_exists ( $ skin , 'setLayout' ) ) { $ skin -> setLayout ( self :: $ skinLayout ) ; } } } self :: $ skin = $ skin ; return true ; }
hook for RequestContextCreateSkin
hook for RequestContextCreateSkin