Index: trunk/extensions/RegexFun/RELEASE-NOTES |
— | — | @@ -1,5 +1,9 @@ |
2 | 2 | Changelog: |
3 | 3 | ========== |
| 4 | + |
| 5 | + * (trunk) -- Version 1.0.2 alpha |
| 6 | + - Internal representative functions for parser functions now have a 'pf_' prefix. |
| 7 | + |
4 | 8 | * November 6, 2011 -- Version 1.0.1 |
5 | 9 | - Bug in '#regex_var' solved: default value now gets returned in case '#regex' went wrong or |
6 | 10 | not called before. |
Index: trunk/extensions/RegexFun/RegexFun.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | * Support: http://www.mediawiki.org/wiki/Extension_talk:Regex_Fun |
10 | 10 | * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/RegexFun |
11 | 11 | * |
12 | | - * @version: 1.0.1 |
| 12 | + * @version: 1.0.2 alpha |
13 | 13 | * @license: ISC license |
14 | 14 | * @author: Daniel Werner < danweetz@web.de > |
15 | 15 | * |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | * |
59 | 59 | * @var string |
60 | 60 | */ |
61 | | - const VERSION = '1.0.1'; |
| 61 | + const VERSION = '1.0.2 alpha'; |
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Sets up parser functions |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | } |
74 | 74 | private static function initFunction( Parser &$parser, $name, $functionCallback = null ) { |
75 | 75 | if( $functionCallback === null ) { |
76 | | - $functionCallback = array( __CLASS__, $name ); |
| 76 | + $functionCallback = array( __CLASS__, "pf_{$name}" ); |
77 | 77 | } |
78 | 78 | |
79 | 79 | global $egRegexFunDisabledFunctions; |
— | — | @@ -253,7 +253,7 @@ |
254 | 254 | * |
255 | 255 | * @return String Result of replacing pattern with replacement in string, or matching text if replacement was omitted |
256 | 256 | */ |
257 | | - public static function regex( Parser &$parser, $subject = '', $pattern = '', $replace = null, $limit = -1 ) { |
| 257 | + public static function pf_regex( Parser &$parser, $subject = '', $pattern = '', $replace = null, $limit = -1 ) { |
258 | 258 | // check whether limit exceeded: |
259 | 259 | if( self::limitExceeded( $parser ) ) { |
260 | 260 | return self::msgLimitExceeded(); |
— | — | @@ -316,7 +316,7 @@ |
317 | 317 | self::setLastMatches( $parser, $matches ); |
318 | 318 | |
319 | 319 | // use #regex_var for transforming replacement string with matches: |
320 | | - $replace = self::regex_var( $parser, $replace ); |
| 320 | + $replace = self::pf_regex_var( $parser, $replace ); |
321 | 321 | |
322 | 322 | // parse the replacement after matches are inserted |
323 | 323 | // use a new frame, no need for SFH_OBJECT_ARGS style parser functions |
— | — | @@ -339,7 +339,7 @@ |
340 | 340 | * |
341 | 341 | * @return String result of all matching text parts separated by a string |
342 | 342 | */ |
343 | | - public static function regexall( &$parser , $subject = '' , $pattern = '' , $separator = ', ' , $offset = 0 , $length = '' ) { |
| 343 | + public static function pf_regexall( &$parser , $subject = '' , $pattern = '' , $separator = ', ' , $offset = 0 , $length = '' ) { |
344 | 344 | // check whether limit exceeded: |
345 | 345 | if( self::limitExceeded( $parser ) ) { |
346 | 346 | return self::msgLimitExceeded(); |
— | — | @@ -384,7 +384,7 @@ |
385 | 385 | * @param $index Integer index of the last match which should be returnd or a string containing $n as indexes to be replaced |
386 | 386 | * @param $defaultVal Integer default value which will be returned when the result with the given index doesn't exist or is a void string |
387 | 387 | */ |
388 | | - public static function regex_var( &$parser, $index = 0, $defaultVal = '' ) { |
| 388 | + public static function pf_regex_var( &$parser, $index = 0, $defaultVal = '' ) { |
389 | 389 | // get matches from last #regex |
390 | 390 | $lastMatches = self::getLastMatches( $parser ); |
391 | 391 | |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | * |
458 | 458 | * @return String Returns the quoted string |
459 | 459 | */ |
460 | | - public static function regexquote( &$parser, $str = null, $delimiter = '/' ) { |
| 460 | + public static function pf_regexquote( &$parser, $str = null, $delimiter = '/' ) { |
461 | 461 | if( $str === null ) { |
462 | 462 | return ''; |
463 | 463 | } |