dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CASCADINGSOURCES parser function
[lhc/web/wiklou.git]
/
includes
/
MagicWord.php
diff --git
a/includes/MagicWord.php
b/includes/MagicWord.php
index
427a1ad
..
bf15bf3
100644
(file)
--- a/
includes/MagicWord.php
+++ b/
includes/MagicWord.php
@@
-149,6
+149,7
@@
class MagicWord {
'contentlanguage',
'numberofadmins',
'numberofviews',
'contentlanguage',
'numberofadmins',
'numberofviews',
+ 'cascadingsources',
);
/* Array of caching hints for ParserCache */
);
/* Array of caching hints for ParserCache */
@@
-709,7
+710,9
@@
class MagicWordArray {
$magic = MagicWord::get( $name );
$case = intval( $magic->isCaseSensitive() );
foreach ( $magic->getSynonyms() as $i => $syn ) {
$magic = MagicWord::get( $name );
$case = intval( $magic->isCaseSensitive() );
foreach ( $magic->getSynonyms() as $i => $syn ) {
- $group = "(?P<{$i}_{$name}>" . preg_quote( $syn, '/' ) . ')';
+ // Group name must start with a non-digit in PCRE 8.34+
+ $it = strtr( $i, '0123456789', 'abcdefghij' );
+ $group = "(?P<{$it}_{$name}>" . preg_quote( $syn, '/' ) . ')';
if ( $this->baseRegex[$case] === '' ) {
$this->baseRegex[$case] = $group;
} else {
if ( $this->baseRegex[$case] === '' ) {
$this->baseRegex[$case] = $group;
} else {