summaryrefslogtreecommitdiffstats
path: root/lib/private/preview.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-13 10:10:11 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-16 12:45:15 +0100
commit8ed27d2ce0477f40a27cdc335361b0d5654a7e09 (patch)
treede2db82b384ab3071c2c17b8e84dd560b9df993c /lib/private/preview.php
parent3b7aec1b7d4e2e3a1ff6c1f7888189c67aa09b75 (diff)
downloadnextcloud-server-8ed27d2ce0477f40a27cdc335361b0d5654a7e09.tar.gz
nextcloud-server-8ed27d2ce0477f40a27cdc335361b0d5654a7e09.zip
Create an interface for OC_Image and OCP\Image for the public API
Diffstat (limited to 'lib/private/preview.php')
-rw-r--r--lib/private/preview.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php
index cb3554fa1e9..f69b0d6c971 100644
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -46,7 +46,7 @@ class Preview {
/**
* preview images object
*
- * @var \OC_Image
+ * @var \OCP\IImage
*/
private $preview;
@@ -465,7 +465,7 @@ class Preview {
/**
* return a preview of a file
- * @return \OC_Image
+ * @return \OCP\IImage
*/
public function getPreview() {
if (!is_null($this->preview) && $this->preview->valid()) {
@@ -518,7 +518,7 @@ class Preview {
/** @var $provider Provider */
$preview = $provider->getThumbnail($file, $maxX, $maxY, $scalingUp, $this->fileView);
- if (!($preview instanceof \OC_Image)) {
+ if (!($preview instanceof \OCP\IImage)) {
continue;
}
@@ -564,7 +564,7 @@ class Preview {
if (is_null($this->preview)) {
$this->getPreview();
}
- if ($this->preview instanceof \OC_Image) {
+ if ($this->preview instanceof \OCP\IImage) {
$this->preview->show($mimeType);
}
}
@@ -580,8 +580,8 @@ class Preview {
$scalingUp = $this->getScalingUp();
$maxScaleFactor = $this->getMaxScaleFactor();
- if (!($image instanceof \OC_Image)) {
- \OC_Log::write('core', '$this->preview is not an instance of OC_Image', \OC_Log::DEBUG);
+ if (!($image instanceof \OCP\IImage)) {
+ \OC_Log::write('core', '$this->preview is not an instance of \OCP\IImage', \OC_Log::DEBUG);
return;
}