r50712 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50711‎ | r50712 | r50713 >
Date:00:53, 18 May 2009
Author:nad
Status:deferred
Tags:
Comment:
Allow MediaWiki:Groups entries to have appended pip-separated freindly name
Modified paths:
  • /trunk/extensions/SimpleSecurity/SimpleSecurity.php (modified) (history)
  • /trunk/extensions/SimpleSecurity/SimpleSecurity_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SimpleSecurity/SimpleSecurity_body.php
@@ -47,8 +47,12 @@
4848 # Add extra available groups if $wgSecurityGroupsArticle is set
4949 if ( $wgSecurityGroupsArticle ) {
5050 $groups = new Article( Title::newFromText( $wgSecurityGroupsArticle, NS_MEDIAWIKI ) );
51 - if ( preg_match_all( '/^\\*?\\s*(.+?)\\s*$/m', $groups->getContent(), $match ) ) {
52 - foreach( $match[1] as $group ) $wgSecurityExtraGroups[$group] = '';
 51+ if ( preg_match_all( "/^\*?\s*(.+?)\s*(\|\s*(.+))?$/m", $groups->getContent(), $match ) ) {
 52+ foreach( $match[1] as $i => $k ) {
 53+ $v = $match[3][$i];
 54+ if ( $v ) $wgSecurityExtraGroups[strtolower( $k )] = $v;
 55+ else $wgSecurityExtraGroups[$k] = '';
 56+ }
5357 }
5458 }
5559
Index: trunk/extensions/SimpleSecurity/SimpleSecurity.php
@@ -22,7 +22,7 @@
2323 if ( !defined( 'MEDIAWIKI' ) ) die( 'Not an entry point.' );
2424 if ( version_compare( $wgVersion, '1.12.0' ) < 0 ) die( 'Sorry, this extension requires at least MediaWiki version 1.12.0' );
2525
26 -define( 'SIMPLESECURITY_VERSION', '4.3.2, 2009-05-06' );
 26+define( 'SIMPLESECURITY_VERSION', '4.3.3, 2009-05-18' );
2727
2828 # Load the SimpleSecurity class and messages
2929 $dir = dirname( __FILE__ ) . '/';

Status & tagging log