X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSkin.php;h=9ecb6150b38cf4712173b4e0a2f4a73e276f4b7c;hb=5ccc792805398296ef91184cf729c231685132bb;hp=b77cf78699dd164de5a11b7f1d6440fccac31e78;hpb=486e48a201c0a5a3638838151b06a71edf7b8d5b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Skin.php b/includes/Skin.php index b77cf78699..9ecb6150b3 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -165,6 +165,9 @@ abstract class Skin extends ContextSource { return $this->skinname; } + /** + * @param $out OutputPage + */ function initPage( OutputPage $out ) { wfProfileIn( __METHOD__ ); @@ -183,7 +186,7 @@ abstract class Skin extends ContextSource { $titles = array( $user->getUserPage(), $user->getTalkPage() ); // Other tab link - if ( $this->getTitle()->getNamespace() == NS_SPECIAL ) { + if ( $this->getTitle()->isSpecialPage() ) { // nothing } elseif ( $this->getTitle()->isTalkPage() ) { $titles[] = $this->getTitle()->getSubjectPage(); @@ -269,7 +272,7 @@ abstract class Skin extends ContextSource { $this->mRelevantUser = User::newFromName( $rootUser, false ); } else { $user = User::newFromName( $rootUser, false ); - if ( $user->isLoggedIn() ) { + if ( $user && $user->isLoggedIn() ) { $this->mRelevantUser = $user; } } @@ -284,6 +287,10 @@ abstract class Skin extends ContextSource { */ abstract function outputPage( OutputPage $out = null ); + /** + * @param $data array + * @return string + */ static function makeVariablesScript( $data ) { if ( $data ) { return Html::inlineScript( @@ -295,28 +302,18 @@ abstract class Skin extends ContextSource { } /** - * Generated JavaScript action=raw&gen=js - * This used to load MediaWiki:Common.js and the skin-specific style - * before the ResourceLoader. + * Make a