X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FfindHooks.php;h=09254065ef19ef61395dfb1307c8d3b9b9f51ff1;hb=dad19d999cf5cc249dacd390a775ef2f56649b86;hp=5cf45367061a82097c9aa733bb6a57011529882b;hpb=a82f0fcb6898faf0d3ff62c6e47a777985f0f3d6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index 5cf4536706..09254065ef 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -72,6 +72,7 @@ class FindHooks extends Maintenance { $IP . '/includes/api/', $IP . '/includes/cache/', $IP . '/includes/changes/', + $IP . '/includes/changetags/', $IP . '/includes/clientpool/', $IP . '/includes/content/', $IP . '/includes/context/', @@ -80,6 +81,7 @@ class FindHooks extends Maintenance { $IP . '/includes/debug/', $IP . '/includes/deferred/', $IP . '/includes/diff/', + $IP . '/includes/exception/', $IP . '/includes/externalstore/', $IP . '/includes/filebackend/', $IP . '/includes/filerepo/', @@ -95,6 +97,7 @@ class FindHooks extends Maintenance { $IP . '/includes/media/', $IP . '/includes/page/', $IP . '/includes/parser/', + $IP . '/includes/password/', $IP . '/includes/rcfeed/', $IP . '/includes/resourceloader/', $IP . '/includes/revisiondelete/', @@ -119,9 +122,9 @@ class FindHooks extends Maintenance { } $potential = array_unique( $potential ); - $bad = array_unique( $bad ); - $todo = array_diff( $potential, $documented ); - $deprecated = array_diff( $documented, $potential ); + $bad = array_diff( array_unique( $bad ), self::$ignore ); + $todo = array_diff( $potential, $documented, self::$ignore ); + $deprecated = array_diff( $documented, $potential, self::$ignore ); // let's show the results: $this->printArray( 'Undocumented', $todo ); @@ -130,6 +133,8 @@ class FindHooks extends Maintenance { if ( count( $todo ) == 0 && count( $deprecated ) == 0 && count( $bad ) == 0 ) { $this->output( "Looks good!\n" ); + } else { + $this->error( 'The script finished with errors.', 1 ); } } @@ -185,7 +190,11 @@ class FindHooks extends Maintenance { $retval = array(); while ( true ) { - $json = Http::get( wfAppendQuery( 'http://www.mediawiki.org/w/api.php', $params ), array(), __METHOD__ ); + $json = Http::get( + wfAppendQuery( 'http://www.mediawiki.org/w/api.php', $params ), + array(), + __METHOD__ + ); $data = FormatJson::decode( $json, true ); foreach ( $data['query']['categorymembers'] as $page ) { if ( preg_match( '/Manual\:Hooks\/([a-zA-Z0-9- :]+)/', $page['title'], $m ) ) { @@ -287,9 +296,7 @@ class FindHooks extends Maintenance { } foreach ( $arr as $v ) { - if ( !in_array( $v, self::$ignore ) ) { - $this->output( "$msg: $v\n" ); - } + $this->output( "$msg: $v\n" ); } } }