summaryrefslogtreecommitdiffstats
path: root/lib/private/PreviewManager.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-09-15 10:52:34 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-09-15 10:52:34 +0200
commit98f91982be83969c0084ad64c72aeaa72d8c4bcc (patch)
tree4ab003e48790a8b3cc8d5a752494e02006b4b3f7 /lib/private/PreviewManager.php
parentd231fc9843b117c3361ce0b4e030d55c59607005 (diff)
downloadnextcloud-server-98f91982be83969c0084ad64c72aeaa72d8c4bcc.tar.gz
nextcloud-server-98f91982be83969c0084ad64c72aeaa72d8c4bcc.zip
Remove deprecated function createPreview
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/PreviewManager.php')
-rw-r--r--lib/private/PreviewManager.php28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php
index 621c45f28c5..b0858643d53 100644
--- a/lib/private/PreviewManager.php
+++ b/lib/private/PreviewManager.php
@@ -149,34 +149,6 @@ class PreviewManager implements IPreview {
}
/**
- * return a preview of a file
- *
- * @param string $file The path to the file where you want a thumbnail from
- * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
- * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
- * @param boolean $scaleUp Scale smaller images up to the thumbnail size or not. Might look ugly
- * @return \OCP\IImage
- * @deprecated 11 Use getPreview
- */
- public function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false) {
- try {
- $userRoot = $this->rootFolder->getUserFolder($this->userId)->getParent();
- $node = $userRoot->get($file);
- if (!($file instanceof File)) {
- throw new NotFoundException();
- }
-
- $preview = $this->getPreview($node, $maxX, $maxY);
- } catch (\Exception $e) {
- return new \OC_Image();
- }
-
- $previewImage = new \OC_Image();
- $previewImage->loadFromData($preview->getContent());
- return $previewImage;
- }
-
- /**
* Returns a preview of a file
*
* The cache is searched first and if nothing usable was found then a preview is