From 9125a27ded2edc5623e120ceaa3a05f051c4d07a Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 6 Feb 2004 15:14:53 +0000 Subject: [PATCH] Allowing bureaucrats to create other bureaucrats --- includes/SpecialMakesysop.php | 16 +++++++++++++++- languages/Language.php | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/includes/SpecialMakesysop.php b/includes/SpecialMakesysop.php index 1a99fd9a07..59960321b5 100644 --- a/includes/SpecialMakesysop.php +++ b/includes/SpecialMakesysop.php @@ -56,6 +56,15 @@ class MakesysopForm { " ); + $makeburo = wfMsg( "setbureaucratflag" ); + $wgOut->addHTML( + " +   + $makeburo + + " + ); + $mss = wfMsg( "makesysopsubmit" ); $wgOut->addHTML( " @@ -69,7 +78,9 @@ class MakesysopForm { function doSubmit() { - global $wgOut, $wgUser, $wgLang, $wpMakesysopUser, $wgDBname, $wgMemc; + global $wgOut, $wgUser, $wgLang, $wpMakesysopUser, $wpSetBureaucrat; + global $wgDBname, $wgMemc; + $parts = explode( "@", $wpMakesysopUser ); if( count( $parts ) == 2){ $username = addslashes( $parts[0] ); @@ -95,6 +106,9 @@ class MakesysopForm { if(! in_array("sysop", $rights ) ){ $rights[] = "sysop"; } + if ( $wpSetBureaucrat && !in_array( "bureaucrat", $rights ) ) { + $rights[] = "bureaucrat"; + } $newrights = addslashes( implode( ",", $rights ) ); } else { $newrights = "sysop"; diff --git a/languages/Language.php b/languages/Language.php index aed5165846..07d15d5e15 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1278,6 +1278,7 @@ Type the name of the user in the box and press the button to make the user an ad "makesysopsubmit" => "Make this user into a sysop", "makesysopok" => "User '$1' is now a sysop", "makesysopfail" => "User '$1' could not be made into a sysop. (Did you enter the name correctly?)", +"setbureaucratflag" => "Set bureaucrat flag", # Move page # -- 2.20.1