mirror of
https://github.com/demostf/migrate.git
synced 2026-06-04 01:34:12 +02:00
encode url for redownload
This commit is contained in:
parent
dbf6332fc0
commit
83554932ab
1 changed files with 4 additions and 1 deletions
|
|
@ -41,7 +41,10 @@ class Migrate {
|
|||
$name = basename($demo['url']);
|
||||
|
||||
$tmpFile = tempnam(sys_get_temp_dir(), 'dem_');
|
||||
copy($demo['url'], $tmpFile);
|
||||
$encodedUrl = rawurlencode($demo['url']);
|
||||
$encodedUrl = str_replace('%2F', '/', $encodedUrl);
|
||||
$encodedUrl = str_replace('%3A//', '://', $encodedUrl);
|
||||
copy($encodedUrl, $tmpFile);
|
||||
|
||||
$newHash = md5_file($tmpFile);
|
||||
if ($newHash !== $demo['hash']) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue