From: Kunal Mehta Date: Thu, 12 Dec 2013 20:54:46 +0000 (-0800) Subject: Ignore testRunLegacyHooks in findHooks.php X-Git-Tag: 1.31.0-rc.0~17161^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=afd167a15059a6cedf20d39d196ddf85caab4e20;p=lhc%2Fweb%2Fwiklou.git Ignore testRunLegacyHooks in findHooks.php Not a real hook, just used for testing. Change-Id: I8944deb63f5f9926342aaee7cf8f990cfb7c5eb3 --- 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" ); + } } } }