Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/213004

Change subject: Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks
......................................................................

Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks

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
---
M docs/hooks.txt
M includes/media/XMP.php
M includes/media/XMPInfo.php
3 files changed, 0 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/213004/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index d15f66d..4fa92a8 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3285,16 +3285,5 @@
 $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.
diff --git a/includes/media/XMP.php b/includes/media/XMP.php
index 50f04ae..5af31fa 100644
--- a/includes/media/XMP.php
+++ b/includes/media/XMP.php
@@ -195,8 +195,6 @@
 
                $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] )
diff --git a/includes/media/XMPInfo.php b/includes/media/XMPInfo.php
index e0a491c..2a31001 100644
--- a/includes/media/XMPInfo.php
+++ b/includes/media/XMPInfo.php
@@ -31,13 +31,6 @@
         * @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;
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/213004
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66406c642168adc703361b75deb95c830c1ddab1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to