r105132 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105131‎ | r105132 | r105133 >
Date:23:10, 4 December 2011
Author:danwe
Status:deferred
Tags:
Comment:
Version 1.0.2 release
Modified paths:
  • /trunk/extensions/RegexFun/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/RegexFun/RegexFun.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RegexFun/RELEASE-NOTES
@@ -1,7 +1,7 @@
22 Changelog:
33 ==========
44
5 - * (trunk) -- Version 1.0.2 alpha
 5+ * December 5, 2011 -- Version 1.0.2
66 - Limit won't exceed early when 'e' flag with many backrefs in replacement is used extensivelly.
77 - It's possible to use the 'Regex Fun' regex system with advanced flags within other extensions.
88 - Performance increased for executing huge numbers of the same regex on different strings.
@@ -48,5 +48,5 @@
4949 - '#regexquote' delimiter set to '/' by default.
5050 - '#regex' no longer returns its value as parsed wikitext (option 'noparse' => false) instead
5151 the 'e' flag can be used (although not exactly the same).
52 - - contributed under ISC License, maintained in wikimedia.org svn.=======
 52+ - contributed under ISC License, maintained in wikimedia.org svn.
5353
\ No newline at end of file
Index: trunk/extensions/RegexFun/RegexFun.php
@@ -8,7 +8,7 @@
99 * Support: http://www.mediawiki.org/wiki/Extension_talk:Regex_Fun
1010 * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/RegexFun
1111 *
12 - * @version: 1.0.2 alpha
 12+ * @version: 1.0.2
1313 * @license: ISC license
1414 * @author: Daniel Werner < danweetz@web.de >
1515 *
@@ -273,7 +273,8 @@
274274 $lastMatches = self::getLastMatches( $parser );
275275 $output = ( preg_match( $pattern, $subject, $lastMatches ) ? $lastMatches[0] : '' );
276276 self::setLastMatches( $parser, $lastMatches );
277 - } else {
 277+ }
 278+ else {
278279 // replace mode:
279280 $limit = (int)$limit;
280281
@@ -298,13 +299,13 @@
299300 }
300301
301302 /**
302 - * 'preg_replace' like function but can handle special modifiers 'e' and 'r'.
 303+ * 'preg_replace'-like function but can handle special modifiers 'e' and 'r'.
303304 *
304305 * @param string &$pattern
305306 * @param string $replacement
306307 * @param string $subject
307308 * @param int $limit
308 - * @param Parser &$parser if 'e' flag should be allowed, a parser objecdt for parsing is required.
 309+ * @param Parser &$parser if 'e' flag should be allowed, a parser object for parsing is required.
309310 * @param array $allowedSpecialFlags all special flags that should be handled, by default 'e' and 'r'.
310311 */
311312 public static function doPregReplace(

Status & tagging log