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-10-20 11:36:11 +0200
commit7af9a41881ed0b9d44d18a0ce03a123a8441adf5 (patch)
tree499d26ccee0d0df3aeac5fe9d27faf2800721698 /application/Url.php
parentceeb8fbeb89f69e41791ae192d073d6afea00f4b (diff)
downloadShaarli-7af9a41881ed0b9d44d18a0ce03a123a8441adf5.tar.gz
Shaarli-7af9a41881ed0b9d44d18a0ce03a123a8441adf5.tar.zst
Shaarli-7af9a41881ed0b9d44d18a0ce03a123a8441adf5.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 *