Index: trunk/phpwiki/fpw/wikiPage.php |
— | — | @@ -28,7 +28,10 @@ |
29 | 29 | $this->revision = "current" ; |
30 | 30 | if ( $this->namespace == "special" ) { # Special page, calling appropriate function |
31 | 31 | $allowed = $wikiAllowedSpecialPages ; # List of allowed special pages |
32 | | - if ( in_array ( "is_sysop" , $user->rights ) ) array_push ( $allowed , "asksql" ) ; # Another function just for sysops |
| 32 | + if ( in_array ( "is_sysop" , $user->rights ) ) { # Functions just for sysops |
| 33 | + array_push ( $allowed , "asksql" ) ; |
| 34 | + array_push ( $allowed , "blockip" ) ; |
| 35 | + } |
33 | 36 | $call = $this->mainTitle ; |
34 | 37 | if ( !in_array ( strtolower ( $call ) , $allowed ) ) { |
35 | 38 | $this->isSpecialPage = true ; |
Index: trunk/phpwiki/fpw/wikiTextEn.php |
— | — | @@ -93,6 +93,8 @@ |
94 | 94 | $wikiCategories = "<b>Categories :</b> " ; |
95 | 95 | $wikiThisCategory = "Articles in this category" ; |
96 | 96 | $wikiCounter = "This page has been accessed $1 times." ; |
| 97 | +$wikiBlockIPTitle = "Block an IP (sysops only)" ; |
| 98 | +$wikiBlockIPText = "IP $1 was blocked by $2" ; |
97 | 99 | |
98 | 100 | # Interwiki links |
99 | 101 | $wikiInterwiki = array ( "w"=>"http://www.wikipedia.com/wiki/$1" , "m"=>"http://meta.wikipedia.com/wiki.phtml?title=$1" ) ; |
Index: trunk/phpwiki/fpw/special_blockip.php |
— | — | @@ -0,0 +1,19 @@ |
| 2 | +<? |
| 3 | +include_once ( "special_makelog.php" ) ; |
| 4 | + |
| 5 | +function blockIP () { |
| 6 | + global $target , $vpage , $wikiBlockIPTitle , |
| 7 | + $wikiBlockIPText , $user ; |
| 8 | + $vpage->special ( $wikiBlockIPTitle ) ; |
| 9 | + |
| 10 | + global $REMODE_ADDR ; |
| 11 | +# $now = date ( "Y-m-d H:i:s" , time () ) ; |
| 12 | +# $userText = "[[$wikiUser:$user->name|$user->name]]" ; |
| 13 | + $logText = "$target (".time().")" ; |
| 14 | + $line = str_replace ( array("$1","$2") , |
| 15 | + array($target,$user->name) , $wikiBlockIPText ) ; |
| 16 | + makeLog ( "wikipedia:Blocked IPs" , "*$logText : $line\n" , $line ) ; |
| 17 | + |
| 18 | + return "<font size='+3' color=red>$line</font>" ; |
| 19 | + } |
| 20 | +?> |
Property changes on: trunk/phpwiki/fpw/special_blockip.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 21 | + native |
Added: svn:keywords |
2 | 22 | + Author Date Id Revision |