Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348163 )

Change subject: Remove ExtractThumbParameters hook, deprecated since MW 1.22
......................................................................

Remove ExtractThumbParameters hook, deprecated since MW 1.22

This was already provided by ::parseParamString, which has been provided
since the original commit of this code. Effectively, this is a revert of
b648cb3a8a8af.

Change-Id: I827c61a5a340d4f107478174263e4a5d385398f4
---
M PagedTiffHandler_body.php
M extension.json
2 files changed, 0 insertions(+), 23 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PagedTiffHandler 
refs/changes/63/348163/1

diff --git a/PagedTiffHandler_body.php b/PagedTiffHandler_body.php
index daebafa..bcace82 100644
--- a/PagedTiffHandler_body.php
+++ b/PagedTiffHandler_body.php
@@ -726,28 +726,6 @@
                return PagedTiffImage::getPageSize( $data, $page );
        }
 
-       /**
-        * Handler for the ExtractThumbParameters hook
-        *
-        * @param $thumbname string URL-decoded basename of URI
-        * @param &$params Array Currently parsed thumbnail params
-        * @return bool
-        */
-       public static function onExtractThumbParameters( $thumbname, array 
&$params ) {
-               if ( !preg_match( '/\.(?:tiff|tif)$/i', $params['f'] ) ) {
-                       return true; // not an tiff file
-               }
-               // Check if the parameters can be extracted from the thumbnail 
name...
-               if ( preg_match( 
'!^(lossy|lossless)-page(\d+)-(\d+)px-[^/]*$!', $thumbname, $m ) ) {
-                       list( /* all */, $lossy, $pagenum, $size ) = $m;
-                       $params['lossy'] = $lossy;
-                       $params['width'] = $size;
-                       $params['page'] = $pagenum;
-                       return false; // valid thumbnail URL
-               }
-               return true; // pass through to next handler
-       }
-
        public function isExpensiveToThumbnail( $file ) {
                return $file->getSize() > static::EXPENSIVE_SIZE_LIMIT;
        }
diff --git a/extension.json b/extension.json
index feebe8a..ec506ac 100644
--- a/extension.json
+++ b/extension.json
@@ -33,7 +33,6 @@
                "PagedTiffHandlerSeleniumTestSuite": 
"selenium/PagedTiffHandlerTestSuite.php"
        },
        "Hooks": {
-               "ExtractThumbParameters": 
"PagedTiffHandler::onExtractThumbParameters",
                "UnitTestsList": "PagedTiffHandler::onUnitTestsList"
        },
        "FileExtensions": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I827c61a5a340d4f107478174263e4a5d385398f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PagedTiffHandler
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to