tidied some code elements

pull/170/head
Peter Goodhall 2014-12-28 16:33:52 +00:00
rodzic f2ce40fe40
commit f3a9cc4d69
1 zmienionych plików z 19 dodań i 26 usunięć

Wyświetl plik

@ -267,6 +267,7 @@ class Logbook extends CI_Controller {
function search_result($id) {
$this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
$this->db->like('COL_CALL', $id);
@ -276,17 +277,13 @@ class Logbook extends CI_Controller {
if ($query->num_rows() > 0)
{
$data['results'] = $query;
$this->load->view('search/result_search.php', $data);
} else {
$this->load->model('search');
$iota_search = $this->search->callsign_iota($id);
if ($iota_search->num_rows() > 0)
{
$data['results'] = $iota_search;
@ -294,7 +291,6 @@ class Logbook extends CI_Controller {
} else {
if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null) {
// Lookup using QRZ
$this->load->library('qrz');
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'));
} else {
// Lookup using hamli
$this->load->library('hamli');
@ -312,7 +306,6 @@ class Logbook extends CI_Controller {
$data['callsign'] = $this->hamli->callsign($id);
}
$data['id'] = strtoupper($id);
$this->load->view('search/result', $data);