summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2015-12-18 14:00:20 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2015-12-18 14:00:20 +0100
commitb460bde7c6c3c70fc0010133c00f1e76a952fa48 (patch)
tree75bc46bd7e9395fd604f4a41ae0ad9010e971503
parenta54be132fca86ceb6d6bb87368f55937f41e94a2 (diff)
downloadnextcloud-server-b460bde7c6c3c70fc0010133c00f1e76a952fa48.tar.gz
nextcloud-server-b460bde7c6c3c70fc0010133c00f1e76a952fa48.zip
Removed deprecated OC_Helper::mimeTypeIcon function
-rw-r--r--apps/files/lib/helper.php8
-rw-r--r--apps/files_sharing/templates/public.php2
-rw-r--r--lib/private/helper.php23
-rw-r--r--lib/private/preview.php2
-rw-r--r--lib/private/template/functions.php4
5 files changed, 7 insertions, 32 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index 9a4e8d59786..4f960518839 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -66,15 +66,15 @@ class Helper {
*/
public static function determineIcon($file) {
if($file['type'] === 'dir') {
- $icon = \OC_Helper::mimetypeIcon('dir');
+ $icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon('dir');
// TODO: move this part to the client side, using mountType
if ($file->isShared()) {
- $icon = \OC_Helper::mimetypeIcon('dir-shared');
+ $icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon('dir-shared');
} elseif ($file->isMounted()) {
- $icon = \OC_Helper::mimetypeIcon('dir-external');
+ $icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon('dir-external');
}
}else{
- $icon = \OC_Helper::mimetypeIcon($file->getMimetype());
+ $icon = \OC::$server->getMimeTypeDetector()->mimeTypeIcon($file->getMimetype());
}
return substr($icon, 0, -3) . 'svg';
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 046f954106a..aa1f926ea35 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -41,7 +41,7 @@ $thumbSize = 1024;
<input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename">
<input type="hidden" name="mimetype" value="<?php p($_['mimetype']) ?>" id="mimetype">
<input type="hidden" name="previewSupported" value="<?php p($_['previewSupported'] ? 'true' : 'false'); ?>" id="previewSupported">
-<input type="hidden" name="mimetypeIcon" value="<?php p(OC_Helper::mimetypeIcon($_['mimetype'])); ?>" id="mimetypeIcon">
+<input type="hidden" name="mimetypeIcon" value="<?php p(\OC::$server->getMimeTypeDetector()->mimeTypeIcon($_['mimetype'])); ?>" id="mimetypeIcon">
<input type="hidden" name="filesize" value="<?php p($_['nonHumanFileSize']); ?>" id="filesize">
<input type="hidden" name="maxSizeAnimateGif" value="<?php p($_['maxSizeAnimateGif']); ?>" id="maxSizeAnimateGif">
diff --git a/lib/private/helper.php b/lib/private/helper.php
index f329d53fa76..95f6be27ccf 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -138,18 +138,6 @@ class OC_Helper {
}
/**
- * get path to icon of file type
- * @param string $mimetype mimetype
- * @return string the url
- *
- * Returns the path to the image of this file type.
- * @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->mimeTypeIcon($mimetype)
- */
- public static function mimetypeIcon($mimetype) {
- return \OC::$server->getMimeTypeDetector()->mimeTypeIcon($mimetype);
- }
-
- /**
* get path to preview of file
* @param string $path path
* @return string the url
@@ -336,17 +324,6 @@ class OC_Helper {
}
/**
- * Try to guess the mimetype based on filename
- *
- * @param string $path
- * @return string
- * @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->detectPath($path)
- */
- static public function getFileNameMimeType($path) {
- return \OC::$server->getMimeTypeDetector()->detectPath($path);
- }
-
- /**
* detect if a given program is found in the search PATH
*
* @param string $name
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 38c043030fc..44d38b354a9 100644
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -1168,7 +1168,7 @@ class Preview {
*/
private function getMimeIcon() {
$image = new \OC_Image();
- $mimeIconWebPath = \OC_Helper::mimetypeIcon($this->mimeType);
+ $mimeIconWebPath = \OC::$server->getMimeTypeDetector()->mimeTypeIcon($this->mimeType);
if (empty(\OC::$WEBROOT)) {
$mimeIconServerPath = \OC::$SERVERROOT . $mimeIconWebPath;
} else {
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index 6298f25edc1..982ecde5850 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -173,11 +173,9 @@ function image_path( $app, $image ) {
* make OC_Helper::mimetypeIcon available as a simple function
* @param string $mimetype mimetype
* @return string link to the image
- *
- * For further information have a look at OC_Helper::mimetypeIcon
*/
function mimetype_icon( $mimetype ) {
- return OC_Helper::mimetypeIcon( $mimetype );
+ return \OC::$server->getMimeTypeDetector()->mimeTypeIcon( $mimetype );
}
/**