From afd167a15059a6cedf20d39d196ddf85caab4e20 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 12 Dec 2013 12:54:46 -0800 Subject: [PATCH] Ignore testRunLegacyHooks in findHooks.php Not a real hook, just used for testing. Change-Id: I8944deb63f5f9926342aaee7cf8f990cfb7c5eb3 --- maintenance/findHooks.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index 52056ea5d8..6892096122 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -42,6 +42,11 @@ require_once __DIR__ . '/Maintenance.php'; * @ingroup Maintenance */ class FindHooks extends Maintenance { + /* + * Hooks that are ignored + */ + protected static $ignore = array( 'testRunLegacyHooks' ); + public function __construct() { parent::__construct(); $this->mDescription = 'Find hooks that are undocumented, missing, or just plain wrong'; @@ -240,8 +245,11 @@ class FindHooks extends Maintenance { if ( $sort ) { asort( $arr ); } + foreach ( $arr as $v ) { - $this->output( "$msg: $v\n" ); + if ( !in_array( $v, self::$ignore ) ) { + $this->output( "$msg: $v\n" ); + } } } } -- 2.20.1