Brian Wolff has uploaded a new change for review.

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


Change subject: Fix getLongDesc if tif file is invalid or has invalid metadata
......................................................................

Fix getLongDesc if tif file is invalid or has invalid metadata

Previously it was displaying as (1) i.e. the value true cast to
a string surounded by parenthesis, which was rather odd. Most
sane thing to do (imho) is just use the generic getLongDesc
from the parent class.

Change-Id: I8c7c8874c1caa6637d51907c4053dc9c4ecf10e3
---
M PagedTiffHandler_body.php
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/PagedTiffHandler_body.php b/PagedTiffHandler_body.php
index c8a5eec..8b8734e 100644
--- a/PagedTiffHandler_body.php
+++ b/PagedTiffHandler_body.php
@@ -543,9 +543,11 @@
                                ->params( $params['size'], $params['mime'] )
                                ->numParams( $params['page_count'] )
                                ->parse();
+               } else {
+                       // If we have no metadata, we have no idea how many 
pages we
+                       // have, so just fallback to the parent class.
+                       return parent::getLongDesc( $image );
                }
-
-               return true;
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c7c8874c1caa6637d51907c4053dc9c4ecf10e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PagedTiffHandler
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>

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

Reply via email to