mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 10:08:38 +00:00
Prevent search for empty call (resulting in SQL error messages)
This commit is contained in:
parent
c3eca478e9
commit
96dd127843
@ -470,10 +470,12 @@ class Visitor extends CI_Controller {
|
||||
$callsign = $this->security->xss_clean($this->input->post('callsign'));
|
||||
$public_slug = $this->security->xss_clean($this->input->post('public_slug'));
|
||||
$this->load->model('publicsearch');
|
||||
$result = $this->publicsearch->search($public_slug, $callsign);
|
||||
$data['page_title'] = "Public Search";
|
||||
$data['callsign'] = $callsign;
|
||||
$data['slug'] = $public_slug;
|
||||
if ($callsign != '') {
|
||||
$result = $this->publicsearch->search($public_slug, $callsign);
|
||||
}
|
||||
if (!empty($result) && $result->num_rows() > 0) {
|
||||
$data['results'] = $result;
|
||||
$this->load->view('visitor/layout/header', $data);
|
||||
|
Loading…
Reference in New Issue
Block a user