Merge "Add dependencies to module mediawiki.util"
[lhc/web/wiklou.git] / maintenance / findHooks.php
index 86c01f4..074388f 100644 (file)
@@ -63,6 +63,8 @@ class FindHooks extends Maintenance {
                $documented = $this->getHooksFromDoc( $IP . '/docs/hooks.txt' );
                $potential = array();
                $bad = array();
+
+               // TODO: Don't hardcode the list of directories
                $pathinc = array(
                        $IP . '/',
                        $IP . '/includes/',
@@ -90,6 +92,7 @@ class FindHooks extends Maintenance {
                        $IP . '/includes/json/',
                        $IP . '/includes/logging/',
                        $IP . '/includes/media/',
+                       $IP . '/includes/page/',
                        $IP . '/includes/parser/',
                        $IP . '/includes/rcfeed/',
                        $IP . '/includes/resourceloader/',
@@ -99,6 +102,7 @@ class FindHooks extends Maintenance {
                        $IP . '/includes/specialpage/',
                        $IP . '/includes/specials/',
                        $IP . '/includes/upload/',
+                       $IP . '/includes/utils/',
                        $IP . '/languages/',
                        $IP . '/maintenance/',
                        $IP . '/maintenance/language/',
@@ -106,6 +110,8 @@ class FindHooks extends Maintenance {
                        $IP . '/tests/parser/',
                        $IP . '/tests/phpunit/suites/',
                        $IP . '/skins/',
+                       $IP . '/skins/MonoBook/',
+                       $IP . '/skins/Vector/',
                );
 
                foreach ( $pathinc as $dir ) {
@@ -130,7 +136,7 @@ class FindHooks extends Maintenance {
 
        /**
         * Get the hook documentation, either locally or from MediaWiki.org
-        * @return array of documented hooks
+        * @return Array of documented hooks
         */
        private function getHooksFromDoc( $doc ) {
                if ( $this->hasOption( 'online' ) ) {
@@ -142,8 +148,8 @@ class FindHooks extends Maintenance {
 
        /**
         * Get hooks from a local file (for example docs/hooks.txt)
-        * @param string $doc filename to look in
-        * @return array Array of documented hooks
+        * @param string $doc Filename to look in
+        * @return Array of documented hooks
         */
        private function getHooksFromLocalDoc( $doc ) {
                $m = array();
@@ -155,7 +161,7 @@ class FindHooks extends Maintenance {
 
        /**
         * Get hooks from www.mediawiki.org using the API
-        * @return array of documented hooks
+        * @return Array of documented hooks
         */
        private function getHooksFromOnlineDoc() {
                // All hooks
@@ -193,7 +199,7 @@ class FindHooks extends Maintenance {
        /**
         * Get hooks from a PHP file
         * @param string $file Full filename to the PHP file.
-        * @return array of hooks found.
+        * @return Array of hooks found.
         */
        private function getHooksFromFile( $file ) {
                $content = file_get_contents( $file );
@@ -210,7 +216,7 @@ class FindHooks extends Maintenance {
        /**
         * Get hooks from the source code.
         * @param string $path Directory where the include files can be found
-        * @return array Array of hooks found.
+        * @return Array of hooks found.
         */
        private function getHooksFromPath( $path ) {
                $hooks = array();
@@ -230,7 +236,7 @@ class FindHooks extends Maintenance {
        /**
         * Get bad hooks (where the hook name could not be determined) from a PHP file
         * @param string $file Full filename to the PHP file.
-        * @return array Array of bad wfRunHooks() lines
+        * @return Array of bad wfRunHooks() lines
         */
        private function getBadHooksFromFile( $file ) {
                $content = file_get_contents( $file );
@@ -248,7 +254,7 @@ class FindHooks extends Maintenance {
        /**
         * Get bad hooks from the source code.
         * @param string $path Directory where the include files can be found
-        * @return array Array of bad wfRunHooks() lines
+        * @return Array of bad wfRunHooks() lines
         */
        private function getBadHooksFromPath( $path ) {
                $hooks = array();