From b7dfb404eddcf569010612ab58f889ac624aaa77 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 12 Jul 2011 00:09:37 +0000 Subject: [PATCH] Added $wgAutopromoteOnceLogInRC variable (bug 29655) --- includes/DefaultSettings.php | 6 ++++++ includes/User.php | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b7b50304df..77975f3d50 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3566,6 +3566,12 @@ $wgAutopromoteOnce = array( 'onView' => array() ); +/* + * Put user rights log entries for autopromotion in recent changes? + * @since 1.18 + */ +$wgAutopromoteOnceLogInRC = true; + /** * $wgAddGroups and $wgRemoveGroups can be used to give finer control over who * can assign which groups at Special:Userrights. Example configuration: diff --git a/includes/User.php b/includes/User.php index b0dcc00e19..d93efa87ce 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1138,6 +1138,8 @@ class User { * @see $wgAutopromoteOnce */ public function addAutopromoteOnceGroups( $event ) { + global $wgAutopromoteOnceLogInRC; + $toPromote = array(); if ( $this->getId() ) { $toPromote = Autopromote::getAutopromoteOnceGroups( $this, $event ); @@ -1148,7 +1150,7 @@ class User { } $newGroups = array_merge( $oldGroups, $toPromote ); // all groups - $log = new LogPage( 'rights', false /* not in RC */ ); + $log = new LogPage( 'rights', $wgAutopromoteOnceLogInRC /* in RC? */ ); $log->addEntry( 'autopromote', $this->getUserPage(), '', // no comment -- 2.20.1