r89731 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89730‎ | r89731 | r89732 >
Date:17:43, 8 June 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* fixed regex to work
* added missing directories
Modified paths:
  • /trunk/phase3/maintenance/findhooks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/findhooks.php
@@ -56,11 +56,15 @@
5757 $pathinc = array(
5858 $IP . '/',
5959 $IP . '/includes/',
 60+ $IP . '/includes/actions/',
6061 $IP . '/includes/api/',
 62+ $IP . '/includes/cache/',
6163 $IP . '/includes/db/',
6264 $IP . '/includes/diff/',
6365 $IP . '/includes/filerepo/',
6466 $IP . '/includes/installer/',
 67+ $IP . '/includes/interwiki/',
 68+ $IP . '/includes/media/',
6569 $IP . '/includes/parser/',
6670 $IP . '/includes/resourceloader/',
6771 $IP . '/includes/revisiondelete/',
@@ -141,7 +145,7 @@
142146 private function getHooksFromFile( $file ) {
143147 $content = file_get_contents( $file );
144148 $m = array();
145 - preg_match_all( '/(wfRunHooks|Hooks\:\:run)\(\s*([\'"])(.*?)\1/', $content, $m );
 149+ preg_match_all( '/(?:wfRunHooks|Hooks\:\:run)\(\s*([\'"])(.*?)\1/', $content, $m );
146150 return $m[2];
147151 }
148152

Follow-up revisions

RevisionCommit summaryAuthorDate
r90103Use camelCase, as pointed out by siebrand on r89731demon01:34, 15 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84555findhooks.php: also check for Hooks::run, not just wfRunHooks. Hooks class ha...ashley20:44, 22 March 2011

Comments

#Comment by Siebrand (talk | contribs)   18:04, 8 June 2011

Nitpick: should this script be named findHooks.php?

Status & tagging log