aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dblayer/functions_mysql.inc.php2
-rw-r--r--include/derivative.inc.php13
2 files changed, 13 insertions, 2 deletions
diff --git a/include/dblayer/functions_mysql.inc.php b/include/dblayer/functions_mysql.inc.php
index 65cb9fbd2..a7655e544 100644
--- a/include/dblayer/functions_mysql.inc.php
+++ b/include/dblayer/functions_mysql.inc.php
@@ -370,7 +370,7 @@ UPDATE '.$tablename.'
{
$separator = $is_first ? '' : ",\n ";
- if (isset($value) and $value != '')
+ if (isset($value) and $value !== '')
{
$query.= $separator.$key.' = \''.$value.'\'';
}
diff --git a/include/derivative.inc.php b/include/derivative.inc.php
index 144e76a27..ca840a4d9 100644
--- a/include/derivative.inc.php
+++ b/include/derivative.inc.php
@@ -55,7 +55,18 @@ final class SrcImage
if (!$this->size && isset($infos['width']) && isset($infos['height']))
{
- $this->size = array($infos['width'], $infos['height']);
+ $width = $infos['width'];
+ $height = $infos['height'];
+
+ // 1 or 5 => 90 clockwise
+ // 3 or 7 => 270 clockwise
+ if ($infos['rotation'] % 2 != 0)
+ {
+ $width = $infos['height'];
+ $height = $infos['width'];
+ }
+
+ $this->size = array($width, $height);
}
}