diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-17 10:53:21 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-17 10:53:21 +0100 |
commit | 19eeb23b910104d2447888c12439a1008cc921b9 (patch) | |
tree | e662494d7f76e4a7dc2a442f27468942b566c803 | |
parent | c92b49c82aad3104f9d60961a57f6d8480c136a5 (diff) | |
download | nextcloud-server-19eeb23b910104d2447888c12439a1008cc921b9.tar.gz nextcloud-server-19eeb23b910104d2447888c12439a1008cc921b9.zip |
OC_Helper::linkTo is deprecated
Replaced with suggested (and calling body of)
-rw-r--r-- | core/templates/404.php | 2 | ||||
-rw-r--r-- | lib/private/helper.php | 6 | ||||
-rw-r--r-- | lib/private/route/router.php | 2 | ||||
-rw-r--r-- | lib/private/template/functions.php | 2 | ||||
-rw-r--r-- | lib/private/templatelayout.php | 4 | ||||
-rw-r--r-- | lib/public/util.php | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/core/templates/404.php b/core/templates/404.php index c8d16e3e8f7..2b12b12cff7 100644 --- a/core/templates/404.php +++ b/core/templates/404.php @@ -16,7 +16,7 @@ if(!isset($_)) {//also provide standalone error page <li class="error"> <?php p($l->t('File not found')); ?><br> <p class="hint"><?php p($l->t('The specified document has not been found on the server.')); ?></p> - <p class="hint"><a href="<?php p(OC_Helper::linkTo('', 'index.php')) ?>"><?php p($l->t('You can click here to return to %s.', array($theme->getName()))); ?></a></p> + <p class="hint"><a href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>"><?php p($l->t('You can click here to return to %s.', array($theme->getName()))); ?></a></p> </li> </ul> <?php endif; ?> diff --git a/lib/private/helper.php b/lib/private/helper.php index 78a567638ef..ed127a62f38 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -93,7 +93,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 +117,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 +147,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 1a6a07ddc9f..380e3492458 100644 --- a/lib/private/templatelayout.php +++ b/lib/private/templatelayout.php @@ -275,8 +275,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")); } /** diff --git a/lib/public/util.php b/lib/public/util.php index 4e783b764ed..e0c875438f2 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -316,7 +316,7 @@ class Util { * @since 4.0.0 - parameter $args was added in 4.5.0 */ public static function linkTo( $app, $file, $args = array() ) { - return(\OC_Helper::linkTo( $app, $file, $args )); + return \OC::$server->getURLGenerator()->linkTo($app, $file, $args); } /** |