Basic static HTML dump generator, experimental
[lhc/web/wiklou.git] / includes / SpecialMakesysop.php
index ef3d0f2..96b8763 100644 (file)
@@ -1,10 +1,14 @@
 <?php
 /**
- *
+ * File is replaced by SpecialUserlevels. It is kept here for migration purposes
  * @package MediaWiki
  * @subpackage SpecialPage
+ * @deprecated
  */
 
+die('Use SpecialUserlevels instead !!'); // [av]
+
+
 /**
  *
  */
@@ -16,11 +20,11 @@ require_once( "LinksUpdate.php" );
 function wfSpecialMakesysop() {
        global $wgUser, $wgOut, $wgRequest;
 
-       if ( 0 == $wgUser->getID() or $wgUser->isBlocked() ) {
+       if ( $wgUser->isAnon() or $wgUser->isBlocked() ) {
                $wgOut->errorpage( "movenologin", "movenologintext" );
                return;
        }
-       if (! $wgUser->isBureaucrat() && ! $wgUser->isDeveloper() ){
+       if (! $wgUser->isAllowed('userrights') ) {
                $wgOut->errorpage( "bureaucrattitle", "bureaucrattext" );
                return;
        }
@@ -162,7 +166,6 @@ class MakesysopForm {
                        $id = intval( substr( $username, 1 ) );
                        $sql = "SELECT ur_user,ur_rights FROM $user_rights WHERE ur_user=$id FOR UPDATE";
                } else {
-                       $encName = $dbw->strencode( $username );
                        $sql = "SELECT ur_user, ur_rights FROM $usertable LEFT JOIN $user_rights ON user_id=ur_user WHERE user_name = '{$username}' FOR UPDATE";
                }