r45729 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45728‎ | r45729 | r45730 >
Date:16:20, 14 January 2009
Author:ialex
Status:deferred
Tags:
Comment:
Added support for APCOND_AGE_FROM_EDIT condition of $wgAutopromote
Modified paths:
  • /trunk/extensions/Configure/CHANGELOG (modified) (history)
  • /trunk/extensions/Configure/Configure.api.php (modified) (history)
  • /trunk/extensions/Configure/Configure.i18n.php (modified) (history)
  • /trunk/extensions/Configure/Configure.page.php (modified) (history)
  • /trunk/extensions/Configure/Configure.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.api.php
@@ -265,7 +265,7 @@
266266 case 'promotion-conds':
267267 $opToName = array_flip( array( 'or' => '|', 'and' => '&', 'xor' => '^', 'not' => '!' ) );
268268 $condsName = array( 1 => 'editcount', 2 => 'age', 3 => 'emailconfirmed',
269 - 4 => 'in-groups', 5 => 'is-ip', 6 => 'ip-in-range' );
 269+ 4 => 'in-groups', 5 => 'is-ip', 6 => 'ip-in-range', 7 => 'age-from-first-edit' );
270270 $validOps = array_keys( $opToName );
271271
272272 $settingRet['values'] = array();
Index: trunk/extensions/Configure/Configure.page.php
@@ -600,7 +600,8 @@
601601 case 'promotion-conds':
602602 $options = array( 'or' => '|', 'and' => '&', 'xor' => '^', 'not' => '!' );
603603 $conds = array( APCOND_EDITCOUNT => 'int', APCOND_AGE => 'int', APCOND_EMAILCONFIRMED => 'bool',
604 - APCOND_INGROUPS => 'array', APCOND_ISIP => 'text', APCOND_IPINRANGE => 'text' );
 604+ APCOND_INGROUPS => 'array', APCOND_ISIP => 'text', APCOND_IPINRANGE => 'text',
 605+ APCOND_AGE_FROM_EDIT => 'int' );
605606
606607 if ( isset( $_REQUEST['wp' . $name . '-vals'] ) ) {
607608 $groups = explode( "\n", trim( $wgRequest->getText( 'wp' . $name . '-vals' ) ) );
@@ -1319,7 +1320,8 @@
13201321 public static function buildPromotionCondsSettingRow( $conf, $allowed, $group, $groupConds ){
13211322 static $options = array( 'or' => '|', 'and' => '&', 'xor' => '^', 'not' => '!' );
13221323 static $conds = array( APCOND_EDITCOUNT => 'int', APCOND_AGE => 'int', APCOND_EMAILCONFIRMED => 'bool',
1323 - APCOND_INGROUPS => 'array', APCOND_ISIP => 'text', APCOND_IPINRANGE => 'text' );
 1324+ APCOND_INGROUPS => 'array', APCOND_ISIP => 'text', APCOND_IPINRANGE => 'text',
 1325+ APCOND_AGE_FROM_EDIT => 'int' );
13241326
13251327 $row = '<div class="configure-biglist promotion-conds-element">';
13261328 $row .= wfMsgHtml( 'configure-condition-operator' ) . ' ';
Index: trunk/extensions/Configure/CHANGELOG
@@ -1,8 +1,11 @@
22 This file lists changes on this extension.
33 Localisation updates are done on betawiki and aren't listed here.
44
 5+0.11.8 - 14 January 2009
 6+ Added support for APCOND_AGE_FROM_EDIT condition of $wgAutopromote.
 7+
58 0.11.7 - 10 January 2009
6 - * Added support for Redirect
 9+ * Added support for Redirect extension
710 * Fixed Special:Extensions: was sometimes throwing an error when saving the
811 configuration
912 * (bug 16953) Fixed error on Special:Configure and Special:ViewConfig
Index: trunk/extensions/Configure/Configure.php
@@ -17,7 +17,7 @@
1818 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure',
1919 'description' => 'Allow authorised users to configure the wiki via a web-based interface',
2020 'descriptionmsg' => 'configure-desc',
21 - 'version' => '0.11.7',
 21+ 'version' => '0.11.8',
2222 );
2323
2424 # Configuration part
Index: trunk/extensions/Configure/Configure.i18n.php
@@ -189,6 +189,7 @@
190190 'configure-condition-name-4' => 'In groups',
191191 'configure-condition-name-5' => 'User\'s IP address',
192192 'configure-condition-name-6' => 'User\'s IP address in CIDR range',
 193+ 'configure-condition-name-7' => 'Minimal age from first edit',
193194 'configure-autopromote-noconds' => 'No prerequisites',
194195
195196 'configure-condition-description-1' => 'Minimum edit count of $1',
@@ -197,6 +198,7 @@
198199 'configure-condition-description-4' => 'In all of the groups $1',
199200 'configure-condition-description-5' => 'User\'s IP address is $1',
200201 'configure-condition-description-6' => 'User\'s IP address in $1 range',
 202+ 'configure-condition-description-7' => 'Minimum account age of $1 {{PLURAL:$1|second|seconds}} after the first edit',
201203
202204 'configure-boolop-description-and' => 'All conditions must be true',
203205 'configure-boolop-description-or' => 'At least one condition must be true',

Status & tagging log