* @author Antoine Musso <hashar at free dot fr>
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that compares documented and actually present mismatches.
$IP . '/includes/actions/',
$IP . '/includes/api/',
$IP . '/includes/cache/',
+ $IP . '/includes/content/',
$IP . '/includes/context/',
$IP . '/includes/db/',
$IP . '/includes/diff/',
*/
private function getHooksFromDoc( $doc ) {
if ( $this->hasOption( 'online' ) ) {
- return $this->getHooksFromOnlineDoc( );
+ return $this->getHooksFromOnlineDoc();
} else {
return $this->getHooksFromLocalDoc( $doc );
}
* 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 );
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];
}
}
$maintClass = 'FindHooks';
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;