Merge pull request #2159 from phl0/eQslBulkPhp7

Make eQSL buld download fucntion backwards compatible
这个提交包含在:
Peter Goodhall 2023-05-22 13:15:46 +01:00 提交者 GitHub
当前提交 17cb6027a5
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23

查看文件

@ -565,7 +565,7 @@ class eqsl extends CI_Controller {
$image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute); $image_url = $this->electronicqsl->card_image($username, urlencode($password), $callsign, $band, $mode, $year, $month, $day, $hour, $minute);
$file = file_get_contents($image_url, true); $file = file_get_contents($image_url, true);
if (str_contains($file, 'Error')) { if (strpos($file, 'Error') !== false) {
$error = rtrim(preg_replace('/^\s*Error: /', '', $file)); $error = rtrim(preg_replace('/^\s*Error: /', '', $file));
return $error; return $error;
} }
@ -639,7 +639,9 @@ class eqsl extends CI_Controller {
} else { } else {
$i++; $i++;
} }
sleep(15); if ($i > 0) {
sleep(15);
}
} }
$data['eqsl_results'] = $eqsl_results; $data['eqsl_results'] = $eqsl_results;
$data['eqsl_stats'] = "Successfully downloaded: ".$i." / Errors: ".count($eqsl_results); $data['eqsl_stats'] = "Successfully downloaded: ".$i." / Errors: ".count($eqsl_results);