kopia lustrzana https://github.com/magicbug/Cloudlog
tidied some code elements
rodzic
f2ce40fe40
commit
f3a9cc4d69
|
@ -267,6 +267,7 @@ class Logbook extends CI_Controller {
|
||||||
|
|
||||||
function search_result($id) {
|
function search_result($id) {
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
|
|
||||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
|
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
|
||||||
|
|
||||||
$this->db->like('COL_CALL', $id);
|
$this->db->like('COL_CALL', $id);
|
||||||
|
@ -276,17 +277,13 @@ class Logbook extends CI_Controller {
|
||||||
|
|
||||||
if ($query->num_rows() > 0)
|
if ($query->num_rows() > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$data['results'] = $query;
|
$data['results'] = $query;
|
||||||
|
|
||||||
$this->load->view('search/result_search.php', $data);
|
$this->load->view('search/result_search.php', $data);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$this->load->model('search');
|
$this->load->model('search');
|
||||||
|
|
||||||
$iota_search = $this->search->callsign_iota($id);
|
$iota_search = $this->search->callsign_iota($id);
|
||||||
|
|
||||||
|
|
||||||
if ($iota_search->num_rows() > 0)
|
if ($iota_search->num_rows() > 0)
|
||||||
{
|
{
|
||||||
$data['results'] = $iota_search;
|
$data['results'] = $iota_search;
|
||||||
|
@ -294,7 +291,6 @@ class Logbook extends CI_Controller {
|
||||||
} else {
|
} else {
|
||||||
if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null) {
|
if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null) {
|
||||||
// Lookup using QRZ
|
// Lookup using QRZ
|
||||||
|
|
||||||
$this->load->library('qrz');
|
$this->load->library('qrz');
|
||||||
|
|
||||||
if(!$this->session->userdata('qrz_session_key')) {
|
if(!$this->session->userdata('qrz_session_key')) {
|
||||||
|
@ -303,8 +299,6 @@ class Logbook extends CI_Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
|
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Lookup using hamli
|
// Lookup using hamli
|
||||||
$this->load->library('hamli');
|
$this->load->library('hamli');
|
||||||
|
@ -312,7 +306,6 @@ class Logbook extends CI_Controller {
|
||||||
$data['callsign'] = $this->hamli->callsign($id);
|
$data['callsign'] = $this->hamli->callsign($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$data['id'] = strtoupper($id);
|
$data['id'] = strtoupper($id);
|
||||||
|
|
||||||
$this->load->view('search/result', $data);
|
$this->load->view('search/result', $data);
|
||||||
|
|
Ładowanie…
Reference in New Issue