Skip to content

Commit

Permalink
Merge pull request #35 from SmartCrowd/refactor
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
Alex committed Oct 19, 2015
2 parents 7684007 + 307d5c5 commit d4f608e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 1,931 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Composer.json:
}
]
```

Для работы старых проектов используется замороженная версия "0.4"
Для подключения прокси листов необходимо добавить файлы в каталог ``` /path/to/project/vendor/SmartCrowd/common_libs/helper/data/```

Например:
Expand Down
99 changes: 0 additions & 99 deletions app/Components/ExternalResource.php

This file was deleted.

8 changes: 3 additions & 5 deletions app/Components/helper/RequestManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

namespace helper;
use Etechnika\IdnaConvert\IdnaConvert;

/**
* Class RequestManager
Expand Down Expand Up @@ -153,12 +154,9 @@ public static function restartCheck($error)
*/
public static function encodeUrl($link)
{
if (!class_exists('\idna_convert'))
include_once("idna_convert.class.php");

$converter = new \idna_convert();
$domain = parse_url($link, PHP_URL_HOST);
return str_replace($domain, $converter->encode($domain), $link);
$encoded_domain = IdnaConvert::encodeString($domain);
return str_replace($domain, $encoded_domain, $link);
}

/**
Expand Down
Loading

0 comments on commit d4f608e

Please sign in to comment.