From: Alexandre Emsenhuber Date: Sun, 15 Dec 2013 13:55:39 +0000 (+0100) Subject: Use a better regular expression to find documented hooks in findHooks.php X-Git-Tag: 1.31.0-rc.0~17513^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=4a5f18e58d133e59d1e30048204863decc698401;p=lhc%2Fweb%2Fwiklou.git Use a better regular expression to find documented hooks in findHooks.php Added a ":" after the second quote so that only strings in the form 'Hook': are matched, otherwise the line 1172 of hooks.txt provoques the the following message: Documented and not found: value because the line starts with 'value'. Change-Id: I1d603e3fa10dcabf25e31f6a71aad233571738b5 --- diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index a936436455..24b23d9976 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -142,7 +142,7 @@ class FindHooks extends Maintenance { private function getHooksFromLocalDoc( $doc ) { $m = array(); $content = file_get_contents( $doc ); - preg_match_all( "/\n'(.*?)'/", $content, $m ); + preg_match_all( "/\n'(.*?)':/", $content, $m ); return array_unique( $m[1] ); }