aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_upload.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/include/functions_upload.inc.php')
-rw-r--r--admin/include/functions_upload.inc.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index 2a5206c1b..19482ee02 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -269,6 +269,11 @@ SELECT
}
}
+ // we need to save the rotation angle in the database to compute
+ // width/height of "multisizes"
+ $rotation_angle = pwg_image::get_rotation_angle($file_path);
+ $rotation = pwg_image::get_rotation_code_from_angle($rotation_angle);
+
$file_infos = pwg_image_infos($file_path);
if (isset($image_id))
@@ -280,6 +285,7 @@ SELECT
'height' => $file_infos['height'],
'md5sum' => $md5sum,
'added_by' => $user['id'],
+ 'rotation' => $rotation,
);
if (isset($level))
@@ -307,6 +313,7 @@ SELECT
'height' => $file_infos['height'],
'md5sum' => $md5sum,
'added_by' => $user['id'],
+ 'rotation' => $rotation,
);
if (isset($level))