From: Evan Prodromou Date: Wed, 28 Jan 2004 22:57:07 +0000 (+0000) Subject: Make it optional to allow anonymous minor edits X-Git-Tag: 1.3.0beta1~1082 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=4382547746d9e75f472f552e530240be35432e5f;p=lhc%2Fweb%2Fwiklou.git Make it optional to allow anonymous minor edits --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e24997fb63..bf5c75584e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -221,4 +221,8 @@ $wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0, # If set, a bold ugly notice will show up at the top of every page. $wgSiteNotice = ""; + +# Whether to allow anonymous users to set changes to 'minor' + +$wgAllowAnonymousMinor = false; ?> diff --git a/includes/EditPage.php b/includes/EditPage.php index 86c3c5c561..680b296fa0 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -84,6 +84,7 @@ class EditPage { global $wpMinoredit, $wpEdittime, $wpTextbox2, $wpSection; global $oldid, $redirect, $section; global $wgLang; + global $wgAllowAnonymousMinor; if(isset($wpSection)) { $section=$wpSection; } else { $wpSection=$section; } @@ -257,17 +258,23 @@ class EditPage { // checked unnecessarily if (!$wpWatchthis && !$wpPreview && $this->mTitle->userIsWatching()) $wpWatchthis=1; - if ( 0 != $wgUser->getID() ) { - $checkboxhtml= - "". - "". - "". - "
"; + $minoredithtml = ""; - } else { - $checkboxhtml=""; + if ( 0 != $wgUser->getID() || $wgAllowAnonymousMinor ) { + $minoredithtml = + "". + ""; } + + $watchhtml = ""; + + if ( 0 != $wgUser->getID() ) { + $watchhtml = "". + ""; + } + + $checkboxhtml= $minoredithtml . $watchhtml . "
"; if ( "preview" == $formtype) {