From 4382547746d9e75f472f552e530240be35432e5f Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 28 Jan 2004 22:57:07 +0000 Subject: [PATCH] Make it optional to allow anonymous minor edits --- includes/DefaultSettings.php | 4 ++++ includes/EditPage.php | 23 +++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) 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) { -- 2.20.1