]> source.dussan.org Git - nextcloud-server.git/commitdiff
OC_Helper::makeURLAbsolute is not used anymore
authorMorris Jobke <hey@morrisjobke.de>
Fri, 18 Dec 2015 10:37:18 +0000 (11:37 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Fri, 18 Dec 2015 10:37:18 +0000 (11:37 +0100)
lib/private/helper.php
tests/lib/helper.php

index 72282362fe6767c0ef7add334946476a7660d8fa..92ae25de4ccb5a7165223cf80fd93c2c2322c722 100644 (file)
@@ -69,18 +69,6 @@ class OC_Helper {
                );
        }
 
-       /**
-        * Makes an $url absolute
-        * @param string $url the url
-        * @return string the absolute url
-        * @deprecated Use \OC::$server->getURLGenerator()->getAbsoluteURL($url)
-        *
-        * Returns a absolute url to the given app and file.
-        */
-       public static function makeURLAbsolute($url) {
-               return OC::$server->getURLGenerator()->getAbsoluteURL($url);
-       }
-
        /**
         * Creates an url for remote use
         * @param string $service id
index 51f7342f45662ac9e8b7ea97f4ba0142a4c2149e..794502e5e21ff78b33cefd9cde4f0d4f93e3abe7 100644 (file)
@@ -243,48 +243,6 @@ class Test_Helper extends \Test\TestCase {
 
        // Url generator methods
 
-       /**
-        * @small
-        * test absolute URL construction
-        * @dataProvider provideDocRootURLs
-        */
-       function testMakeAbsoluteURLDocRoot($url, $expectedResult) {
-               \OC::$WEBROOT = '';
-               $result = \OC_Helper::makeURLAbsolute($url);
-
-               $this->assertEquals($expectedResult, $result);
-       }
-
-       /**
-        * @small
-        * test absolute URL construction
-        * @dataProvider provideSubDirURLs
-        */
-       function testMakeAbsoluteURLSubDir($url, $expectedResult) {
-               \OC::$WEBROOT = '/owncloud';
-               $result = \OC_Helper::makeURLAbsolute($url);
-
-               $this->assertEquals($expectedResult, $result);
-       }
-
-       public function provideDocRootURLs() {
-               return array(
-                       array('index.php', 'http://localhost/index.php'),
-                       array('/index.php', 'http://localhost/index.php'),
-                       array('/apps/index.php', 'http://localhost/apps/index.php'),
-                       array('apps/index.php', 'http://localhost/apps/index.php'),
-               );
-       }
-
-       public function provideSubDirURLs() {
-               return array(
-                       array('index.php', 'http://localhost/owncloud/index.php'),
-                       array('/index.php', 'http://localhost/owncloud/index.php'),
-                       array('/apps/index.php', 'http://localhost/owncloud/apps/index.php'),
-                       array('apps/index.php', 'http://localhost/owncloud/apps/index.php'),
-               );
-       }
-
        /**
         * @small
         * test linkToAbsolute URL construction