From 44abb902c8e0c32bab533cd127730536fc33df11 Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 15 Feb 2012 14:47:03 +0000 Subject: multisize - New derivative method for PwgTemplateAdapter. - add quotes to get_size_htm function. git-svn-id: http://piwigo.org/svn/trunk@13170 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/derivative.inc.php | 2 +- include/template.class.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/derivative.inc.php b/include/derivative.inc.php index c45c77b80..2f2f4b3d1 100644 --- a/include/derivative.inc.php +++ b/include/derivative.inc.php @@ -258,7 +258,7 @@ final class DerivativeImage $size = $this->get_size(); if ($size) { - return 'width='.$size[0].' height='.$size[1]; + return 'width="'.$size[0].'" height="'.$size[1].'"'; } } diff --git a/include/template.class.php b/include/template.class.php index 12fc9d10d..ea70549f9 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -899,6 +899,11 @@ class PwgTemplateAdapter return call_user_func_array('sprintf', $args ); } + function derivative($type, $img) + { + return new DerivativeImage($type, $img); + } + function derivative_url($type, $img) { return DerivativeImage::url($type, $img); -- cgit v1.2.3