From: Aaron Schulz Date: Wed, 11 Jul 2007 01:26:27 +0000 (+0000) Subject: *Make logs show only for users X-Git-Tag: 1.31.0-rc.0~52153 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=051b1a9e1d03031516f4bdeb6ca7f5e84f8cd58f;p=lhc%2Fweb%2Fwiklou.git *Make logs show only for users --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index b6f686146a..6c2094fe9c 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -839,7 +839,6 @@ class SkinTemplate extends Skin { $nav_urls['upload'] = false; } $nav_urls['specialpages'] = array( 'href' => self::makeSpecialUrl( 'Specialpages' ) ); - $nav_urls['log'] = array( 'href' => self::makeSpecialUrl( 'Log' ) ); // default permalink to being off, will override it as required below. $nav_urls['permalink'] = false; @@ -892,10 +891,17 @@ class SkinTemplate extends Skin { $ip = false; } - if($id || $ip) { # both anons and non-anons have contri list + if($id || $ip) { # both anons and non-anons have contribs list $nav_urls['contributions'] = array( 'href' => self::makeSpecialUrlSubpage( 'Contributions', $this->mTitle->getText() ) ); + if( $id ) { + $logPage = SpecialPage::getTitleFor( 'Log' ); + $nav_urls['log'] = array( 'href' => $logPage->getLocalURL( "user={$this->mTitle->getText()}" ) ); + } else { + $nav_urls['log'] = false; + } + if ( $wgUser->isAllowed( 'block' ) ) { $nav_urls['blockip'] = array( 'href' => self::makeSpecialUrlSubpage( 'Blockip', $this->mTitle->getText() ) @@ -905,6 +911,7 @@ class SkinTemplate extends Skin { } } else { $nav_urls['contributions'] = false; + $nav_urls['log'] = false; $nav_urls['blockip'] = false; } $nav_urls['emailuser'] = false; diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 7246791066..766a6f295c 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -203,7 +203,7 @@ class MonoBookTemplate extends QuickTemplate { data['nav_urls'][$special]) { ?>