Make LotW downloads more verbose regarding file writing
这个提交包含在:
父节点
853720592b
当前提交
6e54a915d4
共有 1 个文件被更改,包括 6 次插入 和 0 次删除
|
|
@ -615,6 +615,9 @@ class Lotw extends CI_Controller {
|
|||
|
||||
$config['upload_path'] = './uploads/';
|
||||
$file = $config['upload_path'] . 'lotwreport_download.adi';
|
||||
if (file_exists($file) && ! is_writable($file)) {
|
||||
return "Temporary download file ".$file." is not writable. Aborting!";
|
||||
}
|
||||
|
||||
// Get credentials for LoTW
|
||||
$data['user_lotw_name'] = urlencode($user->user_lotw_name);
|
||||
|
|
@ -643,6 +646,9 @@ class Lotw extends CI_Controller {
|
|||
$lotw_url .= "&qso_qslsince=";
|
||||
$lotw_url .= "$lotw_last_qsl_date";
|
||||
|
||||
if (! is_writable(dirname($file))) {
|
||||
return "Temporary download directory ".dirname($file)." is not writable. Aborting!";
|
||||
}
|
||||
file_put_contents($file, file_get_contents($lotw_url));
|
||||
|
||||
ini_set('memory_limit', '-1');
|
||||
|
|
|
|||
正在加载…
在新工单中引用