From: Tim Starling Date: Wed, 10 Mar 2004 14:37:06 +0000 (+0000) Subject: proxy check X-Git-Tag: 1.3.0beta1~822 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=2382b4521e3ffebcf06db6f610c4c3c78dcbea8d;p=lhc%2Fweb%2Fwiklou.git proxy check --- diff --git a/includes/SpecialBlockme.php b/includes/SpecialBlockme.php new file mode 100644 index 0000000000..23ac2a5f57 --- /dev/null +++ b/includes/SpecialBlockme.php @@ -0,0 +1,29 @@ +addWikiText( wfMsg( "disabled" ) ); + return; + } + + $blockerName = wfMsg( "proxyblocker" ); + $reason = wfMsg( "proxyblockreason" ); + $success = wfMsg( "proxyblocksuccess" ); + + $id = User::idForName( $blockerName ); + if ( !$id ) { + $u = User::newFromName( $blockerName ); + $u->addToDatabase(); + $u->setPassword( bin2hex( mt_rand(0, 0x7fffffff ) ) ); + $u->saveSettings(); + $id = $u->getID(); + } + + $block = new Block( $wgIP, 0, $id, $reason, wfTimestampNow() ); + $block->insert(); + + $wgOut->addWikiText( $success ); +} +?>