summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-17 14:43:02 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-17 14:43:02 +0100
commit358b84c21d31fa67dfde75047deb5a66f8c65360 (patch)
tree7cef79b753af3b70a5d51ed480bdfe3cfb698fda /lib/private
parent311a565f7f3d111f1ecc177a5529ecbbb484a2dd (diff)
parent205c239eab1912d1a8650ae9ed926d28839ac1ec (diff)
downloadnextcloud-server-358b84c21d31fa67dfde75047deb5a66f8c65360.tar.gz
nextcloud-server-358b84c21d31fa67dfde75047deb5a66f8c65360.zip
Merge pull request #21253 from owncloud/deprecated_oc_helper_linkTo
Remove deprecated OC_Helper::linkTo
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/helper.php21
-rw-r--r--lib/private/route/router.php2
-rw-r--r--lib/private/template/functions.php2
-rw-r--r--lib/private/templatelayout.php4
4 files changed, 7 insertions, 22 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 78a567638ef..779a67a2340 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -67,21 +67,6 @@ class OC_Helper {
}
/**
- * Creates an url
- * @param string $app app
- * @param string $file file
- * @param array $args array with param=>value, will be appended to the returned url
- * The value of $args will be urlencoded
- * @return string the url
- * @deprecated Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args)
- *
- * Returns a url to the given app and file.
- */
- public static function linkTo( $app, $file, $args = array() ) {
- return OC::$server->getURLGenerator()->linkTo($app, $file, $args);
- }
-
- /**
* Creates an absolute url
* @param string $app app
* @param string $file file
@@ -93,7 +78,7 @@ class OC_Helper {
*/
public static function linkToAbsolute($app, $file, $args = array()) {
return OC::$server->getURLGenerator()->getAbsoluteURL(
- self::linkTo($app, $file, $args)
+ OC::$server->getURLGenerator()->linkTo($app, $file, $args)
);
}
@@ -117,7 +102,7 @@ class OC_Helper {
* Returns a url to the given service.
*/
public static function linkToRemoteBase($service) {
- return self::linkTo('', 'remote.php') . '/' . $service;
+ return OC::$server->getURLGenerator()->linkTo('', 'remote.php') . '/' . $service;
}
/**
@@ -147,7 +132,7 @@ class OC_Helper {
if ($service === 'files') {
$url = OC::$server->getURLGenerator()->getAbsoluteURL('/s');
} else {
- $url = OC::$server->getURLGenerator()->getAbsoluteURL(self::linkTo('', 'public.php').'?service='.$service);
+ $url = OC::$server->getURLGenerator()->getAbsoluteURL(OC::$server->getURLGenerator()->linkTo('', 'public.php').'?service='.$service);
}
return $url . (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '');
}
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 4ca5e16ddf2..f144c543989 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -92,7 +92,7 @@ class Router implements IRouter {
$this->logger = $logger;
$baseUrl = \OC::$WEBROOT;
if(!(getenv('front_controller_active') === 'true')) {
- $baseUrl = \OC_Helper::linkTo('', 'index.php');
+ $baseUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php');
}
if (!\OC::$CLI) {
$method = $_SERVER['REQUEST_METHOD'];
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index d156d26f9ce..6298f25edc1 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -146,7 +146,7 @@ function component($app, $file) {
* For further information have a look at OC_Helper::linkTo
*/
function link_to( $app, $file, $args = array() ) {
- return OC_Helper::linkTo( $app, $file, $args );
+ return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
}
/**
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index 8522dbccc00..fce018115ac 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -281,8 +281,8 @@ class OC_TemplateLayout extends OC_Template {
$writer->writeAsset($cssCollection);
}
- $this->append('jsfiles', OC_Helper::linkTo('assets', "$jsHash.js"));
- $this->append('cssfiles', OC_Helper::linkTo('assets', "$cssHash.css"));
+ $this->append('jsfiles', \OC::$server->getURLGenerator()->linkTo('assets', "$jsHash.js"));
+ $this->append('cssfiles', \OC::$server->getURLGenerator()->linkTo('assets', "$cssHash.css"));
}
/**