From f3854f220b46022f3fbd06c46d19285b6ab11758 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 2 Jan 2006 17:11:04 +0000 Subject: [PATCH] * Removed broken wgAllowAnonymousMinor and added new group right minoredit --- RELEASE-NOTES | 2 ++ includes/Article.php | 10 ++++++---- includes/DefaultSettings.php | 2 +- includes/EditPage.php | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4b425c797a..6c604abccb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Article.php b/includes/Article.php index 63b7f5aa55..640a510a96 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 529b2f3ab5..1e7dd01775 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; diff --git a/includes/EditPage.php b/includes/EditPage.php index 7261751fd3..a873d0a601 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 = "minoredit?" checked='checked'":""). " accesskey='".wfMsg('accesskey-minoredit')."' id='wpMinoredit' />". -- 2.20.1