r59868 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59867‎ | r59868 | r59869 >
Date:02:18, 9 December 2009
Author:nad
Status:deferred
Tags:
Comment:
start support for more operators than just '='
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -839,8 +839,8 @@
840840 $count = false;
841841 $export = false;
842842 foreach ( func_get_args() as $arg ) if ( !is_object( $arg ) ) {
843 - if ( preg_match( "|^(.+?)\s*=\s*(.+)$|i", $arg, $match ) ) {
844 - list( , $k, $v ) = $match;
 843+ if ( preg_match( "|^(.+?)\s*([<>!=]+)\s*(.+)$|i", $arg, $match ) ) {
 844+ list( , $k, $op, $v ) = $match;
845845 if ( $k == 'title' ) $title = $v;
846846 elseif ( $k == 'name' ) $name = $v;
847847 elseif ( $k == 'invert' ) $invert = $v;
Index: trunk/extensions/RecordAdmin/RecordAdmin.php
@@ -11,7 +11,7 @@
1212 * @licence GNU General Public Licence 2.0 or later
1313 */
1414
15 -define( 'RECORDADMIN_VERSION', '0.9.1, 2009-12-02' );
 15+define( 'RECORDADMIN_VERSION', '0.9.2, 2009-12-09' );
1616
1717 $wgRecordAdminUseNamespaces = false; # Whether record articles should be in a namespace of the same name as their type
1818 $wgRecordAdminCategory = 'Records'; # Category containing record types

Status & tagging log