mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fixed correct return of error
This commit is contained in:
@@ -21,19 +21,22 @@ class Callbook {
|
||||
switch ($this->ci->config->item('callbook')) {
|
||||
case 'qrz':
|
||||
if ($this->ci->config->item('qrz_username') == null || $this->ci->config->item('qrz_password') == null) {
|
||||
return 'Lookup not configured. Please review configuration.';
|
||||
$callbook['error'] = 'Lookup not configured. Please review configuration.';
|
||||
return $callbook;
|
||||
}
|
||||
return $this->qrz($this->ci->config->item('qrz_username'), $this->ci->config->item('qrz_password'), $callsign, $this->ci->config->item('use_fullname'));
|
||||
break;
|
||||
case 'qrzcq':
|
||||
if ($this->ci->config->item('qrzcq_username') == null || $this->ci->config->item('qrzcq_password') == null) {
|
||||
return 'Lookup not configured. Please review configuration.';
|
||||
$callbook['error'] = 'Lookup not configured. Please review configuration.';
|
||||
return $callbook;
|
||||
}
|
||||
return $this->qrzcq($this->ci->config->item('qrzcq_username'), $this->ci->config->item('qrzcq_password'), $callsign);
|
||||
break;
|
||||
case 'hamqth':
|
||||
if ($this->ci->config->item('hamqth_username') == null || $this->ci->config->item('hamqth_password') == null) {
|
||||
return 'Lookup not configured. Please review configuration.';
|
||||
$callbook['error'] = 'Lookup not configured. Please review configuration.';
|
||||
return $callbook;
|
||||
}
|
||||
return $this->hamqth($this->ci->config->item('hamqth_username'), $this->ci->config->item('hamqth_password'), $callsign);
|
||||
break;
|
||||
|
||||
@@ -55,7 +55,7 @@ class Qrzcq {
|
||||
|
||||
$key = (string) $xml->Session->Key;
|
||||
|
||||
$ci->session->set_userdata('qrz_session_key', $key);
|
||||
$ci->session->set_userdata('qrzcq_session_key', $key);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user