summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-12-18 12:00:18 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-12-18 12:00:18 +0100
commit450e2f3bd308388e5df01b2b2ea38e6bf16b1c67 (patch)
tree78029410ea899a5105e512af8e7b7458e6d43717 /lib
parente42f262d85ddd891ce823dd5d9b5a4a87c8a7786 (diff)
downloadnextcloud-server-450e2f3bd308388e5df01b2b2ea38e6bf16b1c67.tar.gz
nextcloud-server-450e2f3bd308388e5df01b2b2ea38e6bf16b1c67.zip
Move OC_Helper code to OCP\Util for linkToRemote
Diffstat (limited to 'lib')
-rw-r--r--lib/private/helper.php26
-rw-r--r--lib/public/util.php6
2 files changed, 5 insertions, 27 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index efbc6bda1db..bd69c13de50 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -54,32 +54,6 @@ class OC_Helper {
private static $templateManager;
/**
- * Creates an url for remote use
- * @param string $service id
- * @return string the url
- *
- * Returns a url to the given service.
- */
- public static function linkToRemoteBase($service) {
- return OC::$server->getURLGenerator()->linkTo('', 'remote.php') . '/' . $service;
- }
-
- /**
- * Creates an absolute url for remote use
- * @param string $service id
- * @param bool $add_slash
- * @return string the url
- *
- * Returns a absolute url to the given service.
- */
- public static function linkToRemote($service, $add_slash = true) {
- return OC::$server->getURLGenerator()->getAbsoluteURL(
- self::linkToRemoteBase($service)
- . (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '')
- );
- }
-
- /**
* Creates an absolute url for public use
* @param string $service id
* @param bool $add_slash
diff --git a/lib/public/util.php b/lib/public/util.php
index 6f5016fa4a1..a9fe0e47de6 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -282,7 +282,11 @@ class Util {
* @since 4.0.0
*/
public static function linkToRemote( $service ) {
- return(\OC_Helper::linkToRemote( $service ));
+ $urlGenerator = \OC::$server->getURLGenerator();
+ $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service;
+ return $urlGenerator->getAbsoluteURL(
+ $remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '')
+ );
}
/**