Make it optional to allow anonymous minor edits
authorEvan Prodromou <evanprodromou@users.mediawiki.org>
Wed, 28 Jan 2004 22:57:07 +0000 (22:57 +0000)
committerEvan Prodromou <evanprodromou@users.mediawiki.org>
Wed, 28 Jan 2004 22:57:07 +0000 (22:57 +0000)
includes/DefaultSettings.php
includes/EditPage.php

index e24997f..bf5c755 100644 (file)
@@ -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;
 ?>
index 86c3c5c..680b296 100644 (file)
@@ -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=
-                       "<input tabindex=3 type=checkbox value=1 name='wpMinoredit'".($wpMinoredit?" checked":"")." id='wpMinoredit'>".
-                       "<label for='wpMinoredit'>{$minor}</label>".
-                       "<input tabindex=4 type=checkbox name='wpWatchthis'".($wpWatchthis?" checked":"")." id='wpWatchthis'>".
-                       "<label for='wpWatchthis'>{$watchthis}</label><br>";
+                $minoredithtml = "";
 
-               } else {
-                       $checkboxhtml="";
+               if ( 0 != $wgUser->getID() || $wgAllowAnonymousMinor ) {
+                       $minoredithtml =
+                       "<input tabindex=3 type=checkbox value=1 name='wpMinoredit'".($wpMinoredit?" checked":"")." id='wpMinoredit'>".
+                       "<label for='wpMinoredit'>{$minor}</label>";
                }
+           
+               $watchhtml = "";
+           
+               if ( 0 != $wgUser->getID() ) {
+                       $watchhtml = "<input tabindex=4 type=checkbox name='wpWatchthis'".($wpWatchthis?" checked":"")." id='wpWatchthis'>".
+                       "<label for='wpWatchthis'>{$watchthis}</label>";
 
+               }
+           
+               $checkboxhtml= $minoredithtml . $watchhtml . "<br>";
 
                if ( "preview" == $formtype) {