[Pkg-owncloud-commits] [owncloud] 60/172: Rotate thumbnail when encryption is enabled
David Prévot
taffit at moszumanska.debian.org
Sun May 18 20:09:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit da0e37ef0372b29bd0780709e3cf9d3c715ee63f
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Mon May 12 11:27:39 2014 +0200
Rotate thumbnail when encryption is enabled
When a picture is encrypted, save it to a temporary file first so that
the PHP function for rotation can access it as file.
---
lib/private/preview/image.php | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php
index 59aaa27..cec5d7c 100644
--- a/lib/private/preview/image.php
+++ b/lib/private/preview/image.php
@@ -22,12 +22,13 @@ class Image extends Provider {
}
$image = new \OC_Image();
- //check if file is encrypted
+
if($fileInfo['encrypted'] === true) {
- $image->loadFromData(stream_get_contents($fileview->fopen($path, 'r')));
- }else{
- $image->loadFromFile($fileview->getLocalFile($path));
+ $fileName = $fileview->toTmpFile($path);
+ } else {
+ $fileName = $fileview->getLocalFile($path);
}
+ $image->loadFromFile($fileName);
return $image->valid() ? $image : false;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list