aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Url.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-10-20 11:31:52 +0200
committerArthurHoaro <arthur@hoa.ro>2016-11-05 14:30:13 +0100
commit0d051da4a14b6325b4ab7d93ebcd63d4a8dc141c (patch)
tree2f239a01e4f87f4fa3110235c609b9944df50258 /application/Url.php
parent515eba6495fdf8b0b283d7ff27329399a3100262 (diff)
downloadShaarli-0d051da4a14b6325b4ab7d93ebcd63d4a8dc141c.tar.gz
Shaarli-0d051da4a14b6325b4ab7d93ebcd63d4a8dc141c.tar.zst
Shaarli-0d051da4a14b6325b4ab7d93ebcd63d4a8dc141c.zip
Minor code cleanup: PHPDoc, spelling, unused variables, etc.
Diffstat (limited to 'application/Url.php')
-rw-r--r--application/Url.php14
1 files changed, 0 insertions, 14 deletions
diff --git a/application/Url.php b/application/Url.php
index c166ff6e..c5c7dd18 100644
--- a/application/Url.php
+++ b/application/Url.php
@@ -62,21 +62,7 @@ function add_trailing_slash($url)
62{ 62{
63 return $url . (!endsWith($url, '/') ? '/' : ''); 63 return $url . (!endsWith($url, '/') ? '/' : '');
64} 64}
65/**
66 * Converts an URL with an IDN host to a ASCII one.
67 *
68 * @param string $url Input URL.
69 *
70 * @return string converted URL.
71 */
72function url_with_idn_to_ascii($url)
73{
74 $parts = parse_url($url);
75 $parts['host'] = idn_to_ascii($parts['host']);
76 65
77 $httpUrl = new \http\Url($parts);
78 return $httpUrl->toString();
79}
80/** 66/**
81 * URL representation and cleanup utilities 67 * URL representation and cleanup utilities
82 * 68 *