r23985 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23984‎ | r23985 | r23986 >
Date:01:26, 11 July 2007
Author:aaron
Status:old
Tags:
Comment:
*Make logs show only for users
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/MonoBook.php
@@ -203,7 +203,7 @@
204204 <?php } ?></li><?php
205205 }
206206
207 - foreach( array('contributions', 'blockip', 'emailuser', 'upload', 'specialpages', 'log') as $special ) {
 207+ foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
208208
209209 if($this->data['nav_urls'][$special]) {
210210 ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
Index: trunk/phase3/includes/SkinTemplate.php
@@ -839,7 +839,6 @@
840840 $nav_urls['upload'] = false;
841841 }
842842 $nav_urls['specialpages'] = array( 'href' => self::makeSpecialUrl( 'Specialpages' ) );
843 - $nav_urls['log'] = array( 'href' => self::makeSpecialUrl( 'Log' ) );
844843
845844 // default permalink to being off, will override it as required below.
846845 $nav_urls['permalink'] = false;
@@ -892,10 +891,17 @@
893892 $ip = false;
894893 }
895894
896 - if($id || $ip) { # both anons and non-anons have contri list
 895+ if($id || $ip) { # both anons and non-anons have contribs list
897896 $nav_urls['contributions'] = array(
898897 'href' => self::makeSpecialUrlSubpage( 'Contributions', $this->mTitle->getText() )
899898 );
 899+ if( $id ) {
 900+ $logPage = SpecialPage::getTitleFor( 'Log' );
 901+ $nav_urls['log'] = array( 'href' => $logPage->getLocalURL( "user={$this->mTitle->getText()}" ) );
 902+ } else {
 903+ $nav_urls['log'] = false;
 904+ }
 905+
900906 if ( $wgUser->isAllowed( 'block' ) ) {
901907 $nav_urls['blockip'] = array(
902908 'href' => self::makeSpecialUrlSubpage( 'Blockip', $this->mTitle->getText() )
@@ -905,6 +911,7 @@
906912 }
907913 } else {
908914 $nav_urls['contributions'] = false;
 915+ $nav_urls['log'] = false;
909916 $nav_urls['blockip'] = false;
910917 }
911918 $nav_urls['emailuser'] = false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r23988Fix regression in URL-encoding from r23985robchurch07:29, 11 July 2007
r24096Merged revisions 23910-24094 via svnmerge from...david22:38, 14 July 2007

Status & tagging log