Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks
authorKunal Mehta <legoktm@gmail.com>
Sat, 23 May 2015 21:05:10 +0000 (23:05 +0200)
committerKunal Mehta <legoktm@gmail.com>
Sat, 23 May 2015 21:05:10 +0000 (23:05 +0200)
These hooks are unused in all extensions in Gerrit. We need to remove
them so we can move these classes into a separate library.

Change-Id: I66406c642168adc703361b75deb95c830c1ddab1

docs/hooks.txt
includes/media/XMP.php
includes/media/XMPInfo.php

index d15f66d..4fa92a8 100644 (file)
@@ -3285,16 +3285,5 @@ $obj: The XmlDumpWriter object.
 $row: The database row for the revision.
 $text: The revision text.
 
-'XMPGetInfo': Called when obtaining the list of XMP tags to extract. Can be used
-to add additional tags to extract.
-&$items: Array containing information on which items to extract. See XMPInfo for
-  details on the format.
-
-'XMPGetResults': Called just before returning the results array of parsing xmp
-data. Can be used to post-process the results.
-&$data: Array of metadata sections (such as $data['xmp-general']) each section
-  is an array of metadata tags returned (each tag is either a value, or an array
-  of values).
-
 More hooks might be available but undocumented, you can execute
 "php maintenance/findHooks.php" to find hidden ones.
index 50f04ae..5af31fa 100644 (file)
@@ -195,8 +195,6 @@ class XMPReader {
 
                $data = $this->results;
 
-               Hooks::run( 'XMPGetResults', array( &$data ) );
-
                if ( isset( $data['xmp-special']['AuthorsPosition'] )
                        && is_string( $data['xmp-special']['AuthorsPosition'] )
                        && isset( $data['xmp-general']['Artist'][0] )
index e0a491c..2a31001 100644 (file)
@@ -31,13 +31,6 @@ class XMPInfo {
         * @return array XMP item configuration array.
         */
        public static function getItems() {
-               if ( !self::$ranHooks ) {
-                       // This is for if someone makes a custom metadata extension.
-                       // For example, a medical wiki might want to decode DICOM xmp properties.
-                       Hooks::run( 'XMPGetInfo', array( &self::$items ) );
-                       self::$ranHooks = true; // Only want to do this once.
-               }
-
                return self::$items;
        }