Commit 96e86d13 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1468144 - fixing issues with gallery and locale



Change-Id: I2be7082789f872ca02e2abcf838fbd959c5d8677
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 33b4f602
...@@ -43,6 +43,7 @@ class PluginBlocktypeGallery extends PluginBlocktype { ...@@ -43,6 +43,7 @@ class PluginBlocktypeGallery extends PluginBlocktype {
$style = isset($configdata['style']) ? intval($configdata['style']) : 2; $style = isset($configdata['style']) ? intval($configdata['style']) : 2;
$copyright = null; // Needed to set Panoramio copyright later... $copyright = null; // Needed to set Panoramio copyright later...
$width = !empty($configdata['width']) ? $configdata['width'] : 75; $width = !empty($configdata['width']) ? $configdata['width'] : 75;
$width = floor($width);
switch ($style) { switch ($style) {
case 0: // thumbnails case 0: // thumbnails
$template = 'thumbnails'; $template = 'thumbnails';
...@@ -376,7 +377,7 @@ class PluginBlocktypeGallery extends PluginBlocktype { ...@@ -376,7 +377,7 @@ class PluginBlocktypeGallery extends PluginBlocktype {
$ratiowidth = $ratiowidth < 16 ? 16 : $ratiowidth; $ratiowidth = $ratiowidth < 16 ? 16 : $ratiowidth;
$ratioheight = $ratioheight < 16 ? 16 : $ratioheight; $ratioheight = $ratioheight < 16 ? 16 : $ratioheight;
$topoffset = (($configwidth - $ratioheight) / 2); $topoffset = floor(($configwidth - $ratioheight) / 2);
$src .= '&size=' . $ratiowidth . 'x' . $ratioheight; $src .= '&size=' . $ratiowidth . 'x' . $ratioheight;
$height = $ratioheight; $height = $ratioheight;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment