diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-03-14 09:49:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 09:49:51 +0100 |
commit | 2d5febd0b9fe7f5b9e6a463fa877fef1148921c8 (patch) | |
tree | b32fd9dc7b08788f231c4cf5aa09e37c0843e6dd | |
parent | 0e48afafed1c3f4048e5e78bd5bdd8ff1f9d3883 (diff) | |
parent | 83873e3da1535e02b3eac72e212f7ba0e251b7b9 (diff) | |
download | nextcloud-server-2d5febd0b9fe7f5b9e6a463fa877fef1148921c8.tar.gz nextcloud-server-2d5febd0b9fe7f5b9e6a463fa877fef1148921c8.zip |
Merge pull request #8811 from nextcloud/remove_dep_util_link
Remove deprecated URL functions for OCP\Util
-rw-r--r-- | apps/files/ajax/list.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/templates/public.php | 2 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Trashbin.php | 2 | ||||
-rw-r--r-- | core/templates/untrustedDomain.php | 2 | ||||
-rw-r--r-- | lib/public/Util.php | 39 |
5 files changed, 4 insertions, 43 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index de3c7ccce5e..951377abf86 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -43,7 +43,7 @@ try { } $data = array(); - $baseUrl = OCP\Util::linkTo('files', 'index.php') . '?dir='; + $baseUrl = \OC::$server->getURLGenerator()->linkTo('files', 'index.php') . '?dir='; $permissions = $dirInfo->getPermissions(); diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 698febd4c17..e8eb28f25c6 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -81,7 +81,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size); <input type="hidden" name="dir" id="dir" value="" /> <div class="hiddenuploadfield"> <input type="file" id="file_upload_start" class="hiddenuploadfield" name="files[]" - data-url="<?php p(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" /> + data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" /> </div> <?php endif; ?> diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index a9eb5224728..3c32e6446ca 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -1000,6 +1000,6 @@ class Trashbin { * @return string */ public static function preview_icon($path) { - return \OCP\Util::linkToRoute('core_ajax_trashbin_preview', array('x' => 32, 'y' => 32, 'file' => $path)); + return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_trashbin_preview', array('x' => 32, 'y' => 32, 'file' => $path)); } } diff --git a/core/templates/untrustedDomain.php b/core/templates/untrustedDomain.php index cd361cff3b4..297220c92bb 100644 --- a/core/templates/untrustedDomain.php +++ b/core/templates/untrustedDomain.php @@ -10,7 +10,7 @@ <?php p($l->t('Depending on your configuration, this button could also work to trust the domain:')); ?> </p> <p style="text-align:center;"> - <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->getAbsoluteURL(\OCP\Util::linkToRoute('settings.AdminSettings.index'))); ?>?trustDomain=<?php p($_['domain']); ?>" class="button"> + <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->getAbsoluteURL(\OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index'))); ?>?trustDomain=<?php p($_['domain']); ?>" class="button"> <?php p($l->t('Add "%s" as trusted domain', array($_['domain']))); ?> </a> </p> diff --git a/lib/public/Util.php b/lib/public/Util.php index 7e431189775..9ffa55e2dfd 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -234,33 +234,6 @@ class Util { } /** - * Creates an url using a defined route - * @param string $route - * @param array $parameters - * @internal param array $args with param=>value, will be appended to the returned url - * @return string the url - * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkToRoute($route, $parameters) - * @since 5.0.0 - */ - public static function linkToRoute( $route, $parameters = array() ) { - return \OC::$server->getURLGenerator()->linkToRoute($route, $parameters); - } - - /** - * Creates an url to the given app and file - * @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 8.1.0 Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args) - * @since 4.0.0 - parameter $args was added in 4.5.0 - */ - public static function linkTo( $app, $file, $args = array() ) { - return \OC::$server->getURLGenerator()->linkTo($app, $file, $args); - } - - /** * Returns the server host name without an eventual port number * @return string the server hostname * @since 5.0.0 @@ -308,18 +281,6 @@ class Util { } /** - * Creates path to an image - * @param string $app app - * @param string $image image name - * @return string the url - * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->imagePath($app, $image) - * @since 4.0.0 - */ - public static function imagePath( $app, $image ) { - return \OC::$server->getURLGenerator()->imagePath($app, $image); - } - - /** * Make a human file size (2048 to 2 kB) * @param int $bytes file size in bytes * @return string a human readable file size |