summaryrefslogtreecommitdiff
path: root/includes/media/DjVu.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
committerPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
commit8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch)
treecd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /includes/media/DjVu.php
parentd7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff)
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'includes/media/DjVu.php')
-rw-r--r--includes/media/DjVu.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php
index 3c053a0c..20e59d18 100644
--- a/includes/media/DjVu.php
+++ b/includes/media/DjVu.php
@@ -17,6 +17,13 @@ class DjVuHandler extends ImageHandler {
function mustRender() { return true; }
function isMultiPage() { return true; }
+ function getParamMap() {
+ return array(
+ 'img_width' => 'width',
+ 'img_page' => 'page',
+ );
+ }
+
function validateParam( $name, $value ) {
if ( in_array( $name, array( 'width', 'height', 'page' ) ) ) {
if ( $value <= 0 ) {
@@ -69,15 +76,14 @@ class DjVuHandler extends ImageHandler {
}
$width = $params['width'];
$height = $params['height'];
- $srcPath = $image->getImagePath();
+ $srcPath = $image->getPath();
$page = $params['page'];
- $pageCount = $this->pageCount( $image );
if ( $page > $this->pageCount( $image ) ) {
return new MediaTransformError( 'thumbnail_error', $width, $height, wfMsg( 'djvu_page_error' ) );
}
if ( $flags & self::TRANSFORM_LATER ) {
- return new ThumbnailImage( $dstUrl, $width, $height, $dstPath );
+ return new ThumbnailImage( $image, $dstUrl, $width, $height, $dstPath, $page );
}
if ( !wfMkdirParents( dirname( $dstPath ) ) ) {
@@ -104,7 +110,7 @@ class DjVuHandler extends ImageHandler {
wfHostname(), $retval, trim($err), $cmd ) );
return new MediaTransformError( 'thumbnail_error', $width, $height, $err );
} else {
- return new ThumbnailImage( $dstUrl, $width, $height, $dstPath );
+ return new ThumbnailImage( $image, $dstUrl, $width, $height, $dstPath, $page );
}
}
@@ -203,4 +209,4 @@ class DjVuHandler extends ImageHandler {
}
}
-?>
+