Proper deprecate methods

This commit is contained in:
Roeland Jago Douma 2015-07-18 21:51:12 +02:00
parent 9cdd637050
commit 88fb389eab
2 changed files with 5 additions and 14 deletions

View File

@ -262,8 +262,7 @@ class Detection implements IMimeTypeDetector {
return $this->mimetypeIcons[$mimetype]; return $this->mimetypeIcons[$mimetype];
} }
if ($mimetype === 'dir-external') { if ($mimetype === 'dir-external') {
$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external. $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external.png');
png');
return $this->mimetypeIcons[$mimetype]; return $this->mimetypeIcons[$mimetype];
} }

View File

@ -394,7 +394,7 @@ class OC_Helper {
* *
* @param string $path * @param string $path
* @return string * @return string
* @deprecated Use \OC::$server->getMimeTypeDetector()->detectPath($path) * @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->detectPath($path)
*/ */
static public function getFileNameMimeType($path) { static public function getFileNameMimeType($path) {
return \OC::$server->getMimeTypeDetector()->detectPath($path); return \OC::$server->getMimeTypeDetector()->detectPath($path);
@ -406,7 +406,7 @@ class OC_Helper {
* @param string $path * @param string $path
* @return string * @return string
* does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead * does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead
* @deprecated Use \OC::$server->getMimeTypeDetector()->detect($path) * @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->detect($path)
*/ */
static function getMimeType($path) { static function getMimeType($path) {
return \OC::$server->getMimeTypeDetector()->detect($path); return \OC::$server->getMimeTypeDetector()->detect($path);
@ -417,7 +417,7 @@ class OC_Helper {
* *
* @param string $mimeType * @param string $mimeType
* @return string * @return string
* @deprecated Use \OC::$server->getMimeTypeDetector()->getSecureMimeType($mimeType) * @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->getSecureMimeType($mimeType)
*/ */
static function getSecureMimeType($mimeType) { static function getSecureMimeType($mimeType) {
return \OC::$server->getMimeTypeDetector()->getSecureMimeType($mimeType); return \OC::$server->getMimeTypeDetector()->getSecureMimeType($mimeType);
@ -428,20 +428,12 @@ class OC_Helper {
* *
* @param string $data * @param string $data
* @return string * @return string
* @deprecated Use \OC::$server->getMimeTypeDetector()->detectString($data) * @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->detectString($data)
*/ */
static function getStringMimeType($data) { static function getStringMimeType($data) {
return \OC::$server->getMimeTypeDetector()->detectString($data); return \OC::$server->getMimeTypeDetector()->detectString($data);
} }
/**
* Checks $_REQUEST contains a var for the $s key. If so, returns the html-escaped value of this var; otherwise returns the default value provided by $d.
* @param string $s name of the var to escape, if set.
* @param string $d default value.
* @return string the print-safe value.
*
*/
/** /**
* detect if a given program is found in the search PATH * detect if a given program is found in the search PATH
* *