Pass error message given by qrz.com to the user

pull/2677/head
phl0 2023-11-11 21:30:45 +01:00
rodzic ba171a586e
commit 87437ca1fb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
3 zmienionych plików z 14 dodań i 5 usunięć

Wyświetl plik

@ -919,9 +919,14 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
}
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
$CI = &get_instance();
$CI->load->model('logbook_model');
$data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
if (isset($data['callsign']['gridsquare'])) {
$CI = &get_instance();
$CI->load->model('logbook_model');
$data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
}
if (isset($data['callsign']['error'])) {
$data['error'] = $data['callsign']['error'];
}
} /*else {
// Lookup using hamli
$this->load->library('hamli');

Wyświetl plik

@ -71,7 +71,7 @@ class Qrz {
// Create XML object
$xml = simplexml_load_string($xml);
if (empty($xml)) return;
if (!empty($xml->Session->Error)) return $data['error'] = $xml->Session->Error;
// Return Required Fields
$data['callsign'] = (string)$xml->Callsign->call;

Wyświetl plik

@ -3,8 +3,8 @@
<p>Sorry, but we didn't find any past QSOs with <?php echo $id; ?></p>
<?php if(isset($callsign['callsign'])) { ?>
<h3>Callbook Search for <?php echo $id; ?></h3>
<?php if(isset($callsign['callsign'])) { ?>
<table>
<tr>
@ -37,5 +37,9 @@
</table>
<?php } else { ?>
<p><?php echo $error; ?></p>
<?php } ?>
</div>