dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7c4867f
)
Support short array syntax in findHooks.php
author
Chad Horohoe
<chadh@wikimedia.org>
Fri, 10 Jun 2016 20:28:24 +0000
(13:28 -0700)
committer
Chad
<chadh@wikimedia.org>
Mon, 13 Jun 2016 21:23:39 +0000
(21:23 +0000)
Bug: T135257
Change-Id: I19d4f073ff730821230ccb28d29df303fbaccbc2
maintenance/findHooks.php
patch
|
blob
|
history
diff --git
a/maintenance/findHooks.php
b/maintenance/findHooks.php
index
7304a2a
..
c91d824
100644
(file)
--- a/
maintenance/findHooks.php
+++ b/
maintenance/findHooks.php
@@
-244,11
+244,11
@@
class FindHooks extends Maintenance {
// Comma for second argument
'(?:\s*(,))?' .
// Second argument must start with array to be processed
- '(?:\s*
array\s*\(
' .
+ '(?:\s*
(?:array\s*\(|\[)
' .
// Matching inside array - allows one deep of brackets
- '((?:[^\(\)
]|\([^\(\)]*\)
)*)' .
+ '((?:[^\(\)
\[\]]|\((?-1)\)|\[(?-1)\]
)*)' .
// End
- '
\)
)?/',
+ '
[\)\]]
)?/',
$content,
$m,
PREG_SET_ORDER