Merge pull request #493 from qligier/pr-extension3

Corrections of Import::url
This commit is contained in:
Tobias Reich 2016-03-19 15:39:34 +01:00
commit b5c000ee72

View File

@ -65,13 +65,12 @@ final class Import {
continue; continue;
} }
$pathinfo = pathinfo($url); $filename = pathinfo($url, PATHINFO_FILENAME) . $extension;
$filename = $pathinfo['filename'] . '.' . $pathinfo['extension'];
$tmp_name = LYCHEE_DATA . $filename; $tmp_name = LYCHEE_DATA . $filename;
if (@copy($url, $tmp_name)===false) { if (@copy($url, $tmp_name)===false) {
$error = true; $error = true;
Log::error(Database::get(), __METHOD__, __LINE__, 'Could not copy file (' . $tmp_name . ') to temp-folder (' . $tmp_name . ')'); Log::error(Database::get(), __METHOD__, __LINE__, 'Could not copy file (' . $url . ') to temp-folder (' . $tmp_name . ')');
continue; continue;
} }