summaryrefslogtreecommitdiffstats
path: root/lib/private/preview
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-11-14 20:57:29 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2013-11-14 20:57:29 +0100
commit617dc0e468cd285a28f337c565f9f9ae1aa2e85f (patch)
treed239833a66fb38a5f46f0b5bdb353ff478e267ca /lib/private/preview
parent99ee95d46c3e14cb902493df3201a2c1ad9d6dc5 (diff)
parentecc7b01cee466d4893f8199abaee363c6bc4dac9 (diff)
downloadnextcloud-server-617dc0e468cd285a28f337c565f9f9ae1aa2e85f.tar.gz
nextcloud-server-617dc0e468cd285a28f337c565f9f9ae1aa2e85f.zip
Merge branch 'master' into moviepreviewfallback
Conflicts: lib/private/preview/movies.php
Diffstat (limited to 'lib/private/preview')
-rw-r--r--lib/private/preview/image.php4
-rw-r--r--lib/private/preview/movies.php3
-rw-r--r--lib/private/preview/mp3.php6
-rw-r--r--lib/private/preview/office-cl.php3
-rw-r--r--lib/private/preview/office-fallback.php3
5 files changed, 12 insertions, 7 deletions
diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php
index 9aec967282d..84343df2608 100644
--- a/lib/private/preview/image.php
+++ b/lib/private/preview/image.php
@@ -21,11 +21,11 @@ class Image extends Provider {
return false;
}
+ $image = new \OC_Image();
//check if file is encrypted
if($fileInfo['encrypted'] === true) {
- $image = new \OC_Image(stream_get_contents($fileview->fopen($path, 'r')));
+ $image->loadFromData(stream_get_contents($fileview->fopen($path, 'r')));
}else{
- $image = new \OC_Image();
$image->loadFromFile($fileview->getLocalFile($path));
}
diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php
index 7e012ec44aa..28f130f7506 100644
--- a/lib/private/preview/movies.php
+++ b/lib/private/preview/movies.php
@@ -69,7 +69,8 @@ if (!\OC_Util::runningOnWindows()) {
unlink($absPath);
if ($returnCode === 0) {
- $image = new \OC_Image($tmpPath);
+ $image = new \OC_Image();
+ $image->loadFromFile($tmpPath);
unlink($tmpPath);
return $image->valid() ? $image : false;
}
diff --git a/lib/private/preview/mp3.php b/lib/private/preview/mp3.php
index 1eed566315c..3fc0ab0490c 100644
--- a/lib/private/preview/mp3.php
+++ b/lib/private/preview/mp3.php
@@ -25,7 +25,8 @@ class MP3 extends Provider {
if(isset($tags['id3v2']['APIC'][0]['data'])) {
$picture = @$tags['id3v2']['APIC'][0]['data'];
unlink($tmpPath);
- $image = new \OC_Image($picture);
+ $image = new \OC_Image();
+ $image->loadFromData($picture);
return $image->valid() ? $image : $this->getNoCoverThumbnail();
}
@@ -39,7 +40,8 @@ class MP3 extends Provider {
return false;
}
- $image = new \OC_Image($icon);
+ $image = new \OC_Image();
+ $image->loadFromFile($icon);
return $image->valid() ? $image : false;
}
diff --git a/lib/private/preview/office-cl.php b/lib/private/preview/office-cl.php
index 8f2e06c050b..b11fed13ba1 100644
--- a/lib/private/preview/office-cl.php
+++ b/lib/private/preview/office-cl.php
@@ -48,7 +48,8 @@ if (!\OC_Util::runningOnWindows()) {
return false;
}
- $image = new \OC_Image($pdf);
+ $image = new \OC_Image();
+ $image->loadFromData($pdf);
unlink($absPath);
unlink($absPath . '.pdf');
diff --git a/lib/private/preview/office-fallback.php b/lib/private/preview/office-fallback.php
index e69ab0ab8cb..f184b3149d5 100644
--- a/lib/private/preview/office-fallback.php
+++ b/lib/private/preview/office-fallback.php
@@ -80,7 +80,8 @@ class MSOfficeExcel extends Provider {
unlink($absPath);
unlink($tmpPath);
- $image = new \OC_Image($pdf);
+ $image = new \OC_Image();
+ $image->loadFromData($pdf);
return $image->valid() ? $image : false;
}