Merge branch 'Wikidata' of ssh://gerrit.wikimedia.org:29418/mediawiki/core into Wikidata
[lhc/web/wiklou.git] / includes / SkinTemplate.php
index 511443f..b74f7c5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Base class for template-based skins
+ * Base class for template-based skins.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * @file
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die( 1 );
-}
-
 /**
  * Wrapper object for MediaWiki's localization functions,
  * to be passed to the template engine.
@@ -648,6 +644,9 @@ class SkinTemplate extends Skin {
                                }
                        }
 
+                       if ( isset( $createaccount_url ) ) {
+                               $personal_urls['createaccount'] = $createaccount_url;
+                       }
 
                        if( $this->showIPinHeader() ) {
                                $href = &$this->userpageUrlDetails['href'];
@@ -669,9 +668,6 @@ class SkinTemplate extends Skin {
                        } else {
                                $personal_urls['login'] = $login_url;
                        }
-                       if ( isset($createaccount_url) ) {
-                               $personal_urls['createaccount'] = $createaccount_url;
-                       }
                }
 
                wfRunHooks( 'PersonalUrls', array( &$personal_urls, &$title ) );
@@ -1190,12 +1186,10 @@ class SkinTemplate extends Skin {
                                'href' => self::makeSpecialUrlSubpage( 'Contributions', $rootUser )
                        );
 
-                       if ( $user->isLoggedIn() ) {
-                               $logPage = SpecialPage::getTitleFor( 'Log' );
-                               $nav_urls['log'] = array(
-                                       'href' => $logPage->getLocalUrl( array( 'user' => $rootUser ) )
-                               );
-                       }
+                       $logPage = SpecialPage::getTitleFor( 'Log' );
+                       $nav_urls['log'] = array(
+                               'href' => $logPage->getLocalUrl( array( 'user' => $rootUser ) )
+                       );
 
                        if ( $this->getUser()->isAllowed( 'block' ) ) {
                                $nav_urls['blockip'] = array(