From: Arthur Date: Thu, 5 May 2016 11:31:13 +0000 (+0200) Subject: Merge pull request #553 from ArthurHoaro/typo X-Git-Tag: v0.7.0~9 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=501939622af1fd99d77c7bd87d88f27cc4139b21;hp=86deafe0ff5a22a37255546cf82325e89bf272b1;p=github%2Fshaarli%2FShaarli.git Merge pull request #553 from ArthurHoaro/typo typo --- diff --git a/application/HttpUtils.php b/application/HttpUtils.php index 0e1ce879..c84ba6f0 100644 --- a/application/HttpUtils.php +++ b/application/HttpUtils.php @@ -27,7 +27,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304) { $urlObj = new Url($url); - $cleanUrl = $urlObj->indToAscii(); + $cleanUrl = $urlObj->idnToAscii(); if (! filter_var($cleanUrl, FILTER_VALIDATE_URL) || ! $urlObj->isHttp()) { return array(array(0 => 'Invalid HTTP Url'), false); @@ -70,7 +70,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304) * Retrieve HTTP headers, following n redirections (temporary and permanent ones). * * @param string $url initial URL to reach. - * @param int $redirectionLimit max redirection follow.. + * @param int $redirectionLimit max redirection follow. * * @return array HTTP headers, or false if it failed. */ diff --git a/application/Url.php b/application/Url.php index 61a30a78..77447c8d 100644 --- a/application/Url.php +++ b/application/Url.php @@ -240,7 +240,7 @@ class Url * * @return string converted cleaned up URL. */ - public function indToAscii() + public function idnToAscii() { $out = $this->cleanup(); if (! function_exists('idn_to_ascii') || ! isset($this->parts['host'])) { diff --git a/tests/Url/UrlTest.php b/tests/Url/UrlTest.php index 5fdc8617..ce82265e 100644 --- a/tests/Url/UrlTest.php +++ b/tests/Url/UrlTest.php @@ -190,10 +190,10 @@ class UrlTest extends PHPUnit_Framework_TestCase $ind = 'http://www.académie-française.fr/'; $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/'; $url = new Url($ind); - $this->assertEquals($expected, $url->indToAscii()); + $this->assertEquals($expected, $url->idnToAscii()); $notInd = 'http://www.academie-francaise.fr/'; $url = new Url($notInd); - $this->assertEquals($notInd, $url->indToAscii()); + $this->assertEquals($notInd, $url->idnToAscii()); } }