]> source.dussan.org Git - nextcloud-server.git/commitdiff
Removed deprecated unsused function OC_Helper::getStringMimeType
authorRoeland Jago Douma <rullzer@owncloud.com>
Fri, 18 Dec 2015 12:43:44 +0000 (13:43 +0100)
committerRoeland Jago Douma <rullzer@owncloud.com>
Fri, 18 Dec 2015 12:43:44 +0000 (13:43 +0100)
lib/private/helper.php
tests/lib/helper.php

index 29ecd85388f60379084fe011bf686aa3fdcf1308..f329d53fa763ea9b067d75839fef6c2820e3238b 100644 (file)
@@ -346,17 +346,6 @@ class OC_Helper {
                return \OC::$server->getMimeTypeDetector()->detectPath($path);
        }
 
-       /**
-        * get the mimetype form a data string
-        *
-        * @param string $data
-        * @return string
-        * @deprecated 8.2.0 Use \OC::$server->getMimeTypeDetector()->detectString($data)
-        */
-       static function getStringMimeType($data) {
-               return \OC::$server->getMimeTypeDetector()->detectString($data);
-       }
-
        /**
         * detect if a given program is found in the search PATH
         *
index 576209df06bb8fb6ab830d2d0cc7d8c6e51efbc3..114354c79365b763a06b705743e722e477322af9 100644 (file)
@@ -71,16 +71,6 @@ class Test_Helper extends \Test\TestCase {
                ];
        }
 
-       function testGetStringMimeType() {
-               if (\OC_Util::runningOnWindows()) {
-                       $this->markTestSkipped('[Windows] Strings have mimetype application/octet-stream on Windows');
-               }
-
-               $result = OC_Helper::getStringMimeType("/data/data.tar.gz");
-               $expected = 'text/plain; charset=us-ascii';
-               $this->assertEquals($result, $expected);
-       }
-
        function testIsSubDirectory() {
                $result = OC_Helper::isSubDirectory("./data/", "/anotherDirectory/");
                $this->assertFalse($result);