Updates findHooks.php for ContentHandler changes.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 12 Oct 2012 06:32:13 +0000 (08:32 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 12 Oct 2012 06:32:13 +0000 (08:32 +0200)
- Added includes/content/ to the list of directories
- Added ContentHandler::runLegacyHooks() to the list of functions that run hooks

Change-Id: I1f21af71443468232b4bc119454f1c93ad343137

maintenance/findHooks.php

index e273c54..9ad4df4 100644 (file)
@@ -64,6 +64,7 @@ class FindHooks extends Maintenance {
                        $IP . '/includes/actions/',
                        $IP . '/includes/api/',
                        $IP . '/includes/cache/',
+                       $IP . '/includes/content/',
                        $IP . '/includes/context/',
                        $IP . '/includes/db/',
                        $IP . '/includes/diff/',
@@ -170,7 +171,7 @@ class FindHooks extends Maintenance {
        private function getHooksFromFile( $file ) {
                $content = file_get_contents( $file );
                $m = array();
-               preg_match_all( '/(?:wfRunHooks|Hooks\:\:run)\(\s*([\'"])(.*?)\1/', $content, $m );
+               preg_match_all( '/(?:wfRunHooks|Hooks\:\:run|ContentHandler\:\:runLegacyHooks)\(\s*([\'"])(.*?)\1/', $content, $m );
                return $m[2];
        }