r91931 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91930‎ | r91931 | r91932 >
Date:00:09, 12 July 2011
Author:aaron
Status:ok
Tags:
Comment:
Added $wgAutopromoteOnceLogInRC variable (bug 29655)
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -1138,6 +1138,8 @@
11391139 * @see $wgAutopromoteOnce
11401140 */
11411141 public function addAutopromoteOnceGroups( $event ) {
 1142+ global $wgAutopromoteOnceLogInRC;
 1143+
11421144 $toPromote = array();
11431145 if ( $this->getId() ) {
11441146 $toPromote = Autopromote::getAutopromoteOnceGroups( $this, $event );
@@ -1148,7 +1150,7 @@
11491151 }
11501152 $newGroups = array_merge( $oldGroups, $toPromote ); // all groups
11511153
1152 - $log = new LogPage( 'rights', false /* not in RC */ );
 1154+ $log = new LogPage( 'rights', $wgAutopromoteOnceLogInRC /* in RC? */ );
11531155 $log->addEntry( 'autopromote',
11541156 $this->getUserPage(),
11551157 '', // no comment
Index: trunk/phase3/includes/DefaultSettings.php
@@ -3566,6 +3566,12 @@
35673567 'onView' => array()
35683568 );
35693569
 3570+/*
 3571+ * Put user rights log entries for autopromotion in recent changes?
 3572+ * @since 1.18
 3573+ */
 3574+$wgAutopromoteOnceLogInRC = true;
 3575+
35703576 /**
35713577 * $wgAddGroups and $wgRemoveGroups can be used to give finer control over who
35723578 * can assign which groups at Special:Userrights. Example configuration:

Status & tagging log