summaryrefslogtreecommitdiff
path: root/includes/SpecialBlockme.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-12-15 18:02:47 +0100
committerPierre Schmitz <pierre@archlinux.de>2008-12-15 18:02:47 +0100
commit396b28f3d881f5debd888ba9bb9b47c2d478a76f (patch)
tree10d6e1a721ee4ef69def34a57f02d7eb3fc9e31e /includes/SpecialBlockme.php
parent0be4d3ccf6c4fe98a72704f9463ecdea2ee5e615 (diff)
update to Mediawiki 1.13.3; some cleanups
Diffstat (limited to 'includes/SpecialBlockme.php')
-rw-r--r--includes/SpecialBlockme.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/includes/SpecialBlockme.php b/includes/SpecialBlockme.php
deleted file mode 100644
index 6c9dea06..00000000
--- a/includes/SpecialBlockme.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/**
- *
- * @addtogroup SpecialPage
- */
-
-/**
- *
- */
-function wfSpecialBlockme() {
- global $wgRequest, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
-
- $ip = wfGetIP();
-
- if( !$wgBlockOpenProxies || $wgRequest->getText( 'ip' ) != md5( $ip . $wgProxyKey ) ) {
- $wgOut->addWikiMsg( 'proxyblocker-disabled' );
- return;
- }
-
- $blockerName = wfMsg( "proxyblocker" );
- $reason = wfMsg( "proxyblockreason" );
-
- $u = User::newFromName( $blockerName );
- $id = $u->idForName();
- if ( !$id ) {
- $u = User::newFromName( $blockerName );
- $u->addToDatabase();
- $u->setPassword( bin2hex( mt_rand(0, 0x7fffffff ) ) );
- $u->saveSettings();
- $id = $u->getID();
- }
-
- $block = new Block( $ip, 0, $id, $reason, wfTimestampNow() );
- $block->insert();
-
- $wgOut->addWikiMsg( "proxyblocksuccess" );
-}
-