(bug 32412) TOC links on [[Special:EditWatchlist]] now points to the fieldset
[lhc/web/wiklou.git] / includes / Skin.php
index 43176f2..dc697a3 100644 (file)
@@ -269,7 +269,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;
                                }
                        }
@@ -739,7 +739,7 @@ abstract class Skin extends ContextSource {
                $msgObj = $this->msg( $msg )->rawParams( $link );
                if ( $forContent ) {
                        $msg = $msgObj->inContentLanguage()->text();
-                       if ( $this->getLang()->getCode() !== $wgContLang->getCode() ) {
+                       if ( $this->getLanguage()->getCode() !== $wgContLang->getCode() ) {
                                $msg = Html::rawElement( 'span', array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), $msg );
                        }
                        return $msg;
@@ -801,8 +801,8 @@ abstract class Skin extends ContextSource {
                }
 
                if ( $timestamp ) {
-                       $d = $this->getLang()->userDate( $timestamp, $this->getUser() );
-                       $t = $this->getLang()->userTime( $timestamp, $this->getUser() );
+                       $d = $this->getLanguage()->userDate( $timestamp, $this->getUser() );
+                       $t = $this->getLanguage()->userTime( $timestamp, $this->getUser() );
                        $s = ' ' . $this->msg( 'lastmodifiedat', $d, $t )->text();
                } else {
                        $s = '';
@@ -1061,7 +1061,7 @@ abstract class Skin extends ContextSource {
                global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
                wfProfileIn( __METHOD__ );
 
-               $key = wfMemcKey( 'sidebar', $this->getLang()->getCode() );
+               $key = wfMemcKey( 'sidebar', $this->getLanguage()->getCode() );
 
                if ( $wgEnableSidebarCache ) {
                        $cachedsidebar = $parserMemc->get( $key );