summaryrefslogtreecommitdiff
path: root/includes/media/SVG.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/SVG.php
parentd7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff)
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'includes/media/SVG.php')
-rw-r--r--includes/media/SVG.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/includes/media/SVG.php b/includes/media/SVG.php
index 5307e269..75d0ad3d 100644
--- a/includes/media/SVG.php
+++ b/includes/media/SVG.php
@@ -14,7 +14,7 @@ class SvgHandler extends ImageHandler {
}
}
- function mustRender() {
+ function mustRender( $file ) {
return true;
}
@@ -31,7 +31,7 @@ class SvgHandler extends ImageHandler {
$srcWidth = $image->getWidth( $params['page'] );
$srcHeight = $image->getHeight( $params['page'] );
$params['physicalWidth'] = $wgSVGMaxSize;
- $params['physicalHeight'] = Image::scaleHeight( $srcWidth, $srcHeight, $wgSVGMaxSize );
+ $params['physicalHeight'] = File::scaleHeight( $srcWidth, $srcHeight, $wgSVGMaxSize );
}
return true;
}
@@ -46,12 +46,10 @@ class SvgHandler extends ImageHandler {
$clientHeight = $params['height'];
$physicalWidth = $params['physicalWidth'];
$physicalHeight = $params['physicalHeight'];
- $srcWidth = $image->getWidth();
- $srcHeight = $image->getHeight();
- $srcPath = $image->getImagePath();
+ $srcPath = $image->getPath();
if ( $flags & self::TRANSFORM_LATER ) {
- return new ThumbnailImage( $dstUrl, $clientWidth, $clientHeight, $dstPath );
+ return new ThumbnailImage( $image, $dstUrl, $clientWidth, $clientHeight, $dstPath );
}
if ( !wfMkdirParents( dirname( $dstPath ) ) ) {
@@ -82,7 +80,7 @@ class SvgHandler extends ImageHandler {
wfHostname(), $retval, trim($err), $cmd ) );
return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $err );
} else {
- return new ThumbnailImage( $dstUrl, $clientWidth, $clientHeight, $dstPath );
+ return new ThumbnailImage( $image, $dstUrl, $clientWidth, $clientHeight, $dstPath );
}
}
@@ -93,5 +91,12 @@ class SvgHandler extends ImageHandler {
function getThumbType( $ext, $mime ) {
return array( 'png', 'image/png' );
}
+
+ function getLongDesc( $file ) {
+ global $wgLang;
+ return wfMsg( 'svg-long-desc', $file->getWidth(), $file->getHeight(),
+ $wgLang->formatSize( $file->getSize() ) );
+ }
}
-?>
+
+