* Removed broken wgAllowAnonymousMinor and added new group right minoredit
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 2 Jan 2006 17:11:04 +0000 (17:11 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 2 Jan 2006 17:11:04 +0000 (17:11 +0000)
RELEASE-NOTES
includes/Article.php
includes/DefaultSettings.php
includes/EditPage.php

index 4b425c7..6c604ab 100644 (file)
@@ -395,6 +395,8 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 714) "plainlinks" class issues in IE, Opera
 * (bug 4317) Inconsistent "broken redirects" messages
 * Default interface text for "selflinks" tweaked
+* Removed broken wgAllowAnonymousMinor and added new group right minoredit
+
 
 === Caveats ===
 
index 63b7f5a..640a510 100644 (file)
@@ -1142,7 +1142,9 @@ class Article {
                        $text="== {$summary} ==\n\n".$text;
                }
                $text = $this->preSaveTransform( $text );
-               $isminor = ( $isminor && $wgUser->isLoggedIn() ) ? 1 : 0;
+
+               /* Silently ignore minoredit if not allowed */
+               $isminor = $isminor && $wgUser->isAllowed('minoredit');
                $now = wfTimestampNow();
 
                $dbw =& wfGetDB( DB_MASTER );
@@ -1322,11 +1324,11 @@ class Article {
                        return false;
                }
 
-               $isminor = ( $minor && $wgUser->isLoggedIn() );
+               $isminor = $minor && $wgUser->isAllowed('minoredit');
                if ( $this->isRedirect( $text ) ) {
                        $redir = 1;
-               } else { 
-                       $redir = 0; 
+               } else {
+                       $redir = 0;
                }
 
                $text = $this->preSaveTransform( $text );
index 529b2f3..1e7dd01 100644 (file)
@@ -730,7 +730,6 @@ $wgUseCommaCount = false;
 $wgHitcounterUpdateFreq = 1;
 
 # Basic user rights and block settings
-$wgAllowAnonymousMinor = false; # Allow anonymous users to mark changes as 'minor'
 $wgSysopUserBans        = true; # Allow sysops to ban logged-in users
 $wgSysopRangeBans              = true; # Allow sysops to ban IP ranges
 $wgAutoblockExpiry             = 86400; # Number of seconds before autoblock entries expire
@@ -776,6 +775,7 @@ $wgGroupPermissions['user' ]['createtalk']      = true;
 $wgGroupPermissions['user' ]['upload']          = true;
 $wgGroupPermissions['user' ]['reupload']        = true;
 $wgGroupPermissions['user' ]['reupload-shared'] = true;
+$wgGroupPermissions['user' ]['minoredit']       = true;
 
 // Implicit group for accounts that pass $wgAutoConfirmAge
 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
index 7261751..a873d0a 100644 (file)
@@ -665,7 +665,7 @@ class EditPage {
         *                      near the top, for captchas and the like.
         */
        function showEditForm( $formCallback=null ) {
-               global $wgOut, $wgUser, $wgAllowAnonymousMinor, $wgLang, $wgContLang;
+               global $wgOut, $wgUser, $wgLang, $wgContLang;
 
                $fname = 'EditPage::showEditForm';
                wfProfileIn( $fname );
@@ -784,7 +784,7 @@ class EditPage {
 
                $minoredithtml = '';
 
-               if ( $wgUser->isLoggedIn() || $wgAllowAnonymousMinor ) {
+               if ( $wgUser->isAllowed('minoredit') ) {
                        $minoredithtml =
                                "<input tabindex='3' type='checkbox' value='1' name='wpMinoredit'".($this->minoredit?" checked='checked'":"").
                                " accesskey='".wfMsg('accesskey-minoredit')."' id='wpMinoredit' />".