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
This commit is contained in:
patdenice
2012-02-15 14:47:03 +00:00
parent f5f908a07e
commit 44abb902c8
2 changed files with 6 additions and 1 deletions

View File

@@ -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].'"';
}
}

View File

@@ -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);