Removed deprecated ExtractThumbParameters hook
authorJames D. Forrester <jforrester@wikimedia.org>
Thu, 13 Apr 2017 22:49:47 +0000 (15:49 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Mon, 15 May 2017 12:17:04 +0000 (13:17 +0100)
Depends-On: I827c61a5a340d4f107478174263e4a5d385398f4
Change-Id: I97e820d78d8041c40fb6e553c4081c676602462c

RELEASE-NOTES-1.30
docs/hooks.txt
thumb.php

index 27acb8a..d7c0d25 100644 (file)
@@ -66,6 +66,7 @@ changes to languages because of Phabricator reports.
   deprecated. There are no known callers.
 * File::getStreamHeaders() was deprecated.
 * MediaHandler::getStreamHeaders() was deprecated.
+* The ExtractThumbParameters hook (deprecated in 1.21) was removed.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
index d95e39b..62b22e1 100644 (file)
@@ -1527,13 +1527,6 @@ $ip: The ip address of the user
 change the tables headers.
 &$extTypes: associative array of extensions types
 
-'ExtractThumbParameters': DEPRECATED! Media handler should override
-MediaHandler::parseParamString instead.
-Called when extracting thumbnail parameters from a thumbnail file name.
-$thumbname: the base name of the thumbnail file
-&$params: the currently extracted params (has source name, temp or archived
-zone)
-
 'FetchChangesList': When fetching the ChangesList derivative for a particular
 user.
 $user: User the list is being fetched for
index d97f8e8..7c3e757 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -530,15 +530,6 @@ function wfExtractThumbParams( $file, $params ) {
        $thumbname = $params['thumbName'];
        unset( $params['thumbName'] );
 
-       // Do the hook first for older extensions that rely on it.
-       if ( !Hooks::run( 'ExtractThumbParameters', [ $thumbname, &$params ] ) ) {
-               // Check hooks if parameters can be extracted
-               // Hooks return false if they manage to *resolve* the parameters
-               // This hook should be considered deprecated
-               wfDeprecated( 'ExtractThumbParameters', '1.22' );
-               return $params; // valid thumbnail URL (via extension or config)
-       }
-
        // FIXME: Files in the temp zone don't set a MIME type, which means
        // they don't have a handler. Which means we can't parse the param
        // string. However, not a big issue as what good is a param string