summaryrefslogtreecommitdiff
path: root/maintenance/findHooks.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/findHooks.php')
-rw-r--r--maintenance/findHooks.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php
index e273c545..778da5a1 100644
--- a/maintenance/findHooks.php
+++ b/maintenance/findHooks.php
@@ -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/',
@@ -114,7 +115,7 @@ class FindHooks extends Maintenance {
*/
private function getHooksFromDoc( $doc ) {
if ( $this->hasOption( 'online' ) ) {
- return $this->getHooksFromOnlineDoc( );
+ return $this->getHooksFromOnlineDoc();
} else {
return $this->getHooksFromLocalDoc( $doc );
}
@@ -136,7 +137,7 @@ class FindHooks extends Maintenance {
* Get hooks from www.mediawiki.org using the API
* @return array of documented hooks
*/
- private function getHooksFromOnlineDoc( ) {
+ private function getHooksFromOnlineDoc() {
// All hooks
$allhookdata = Http::get( 'http://www.mediawiki.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:MediaWiki_hooks&cmlimit=500&format=php' );
$allhookdata = unserialize( $allhookdata );
@@ -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];
}