r179 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r178‎ | r179 | r180 >
Date:20:36, 20 February 2002
Author:magnus_manske
Status:old
Tags:
Comment:
blocking IPs, part 1
Modified paths:
  • /trunk/phpwiki/fpw/special_dohistory.php (modified) (history)
  • /trunk/phpwiki/fpw/special_recentchangeslayout.php (modified) (history)
  • /trunk/phpwiki/fpw/wikiTextEn.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/special_recentchangeslayout.php
@@ -56,7 +56,9 @@
5757 $u = explode ( "." , $u ) ;
5858 $u = $u[0].".".$u[1].".".$u[2].".xxx" ;
5959 # $u = "<font color=red>$u</font>" ; # IPs in red, deactivated
60 - }
 60+ } else {
 61+ $u .= $s->appendix ;
 62+ }
6163 $comment = trim($s->cur_comment) ;
6264 if ( $comment == "*" ) $comment = "" ;
6365 $o_comment = $comment ;
Index: trunk/phpwiki/fpw/special_dohistory.php
@@ -2,7 +2,7 @@
33 include_once ( "special_recentchangeslayout.php" ) ;
44
55 function doHistory ( $title ) {
6 - global $THESCRIPT , $vpage , $wikiHistoryTitle , $wikiCurrentVersion , $wikiHistoryHeader ;
 6+ global $THESCRIPT , $vpage , $wikiHistoryTitle , $wikiCurrentVersion , $wikiHistoryHeader , $wikiBlockIP ;
77 $vpage = new WikiPage ;
88 $vpage->SetTitle ( $title ) ;
99 $ti = $vpage->secureTitle ;
@@ -38,6 +38,7 @@
3939 $version = 0;
4040 foreach ( array_keys ( $a ) as $i ) {
4141 if ( $version > 0 ) $a[$i]->version = $version;
 42+ if ( $a[$i]->cur_used == 0 ) $a[$i]->appendix = " (<a href=\"".wikiLink("special:blockIP&target=".$a[$i]->cur_user_text)."\">$wikiBlockIP</a>)" ; # This will show for sysops only!
4243 $version++;
4344 }
4445
Index: trunk/phpwiki/fpw/wikiTextEn.php
@@ -367,6 +367,7 @@
368368 $wikiNoRefresh = "(The page was last refreshed just $1 minutes ago; please wait another $2 minutes and try again.)" ;
369369 $wikiLastRefreshed = "Last refreshed $1" ;
370370 $wikiValidate = "Validate this page" ;
 371+$wikiBlockIP = "Block this IP" ;
371372
372373 #---------------------------
373374 #Functions

Status & tagging log