mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fix the widget. Slug needs to be mandatory
This commit is contained in:
@@ -104,11 +104,15 @@ class Oqrs extends CI_Controller {
|
||||
|
||||
$slug = $this->input->post('slug', TRUE);
|
||||
$userid = $this->publicsearch->get_userid_for_slug($slug);
|
||||
$data['disable_oqrs'] = $this->config->item('disable_oqrs');
|
||||
$data['oqrs_enabled'] = $this->oqrs_model->oqrs_enabled($slug);
|
||||
$data['public_search_enabled'] = $this->publicsearch->public_search_enabled($slug);
|
||||
$data['groupedSearchShowStationName'] = $this->user_options_model->get_options('oqrs',array('option_name'=>'oqrs_grouped_search_show_station_name','option_key'=>'boolean'), $userid)->row()->option_value;
|
||||
|
||||
$data['result'] = $this->oqrs_model->getQueryDataGrouped($this->input->post('callsign', TRUE), $userid);
|
||||
$data['callsign'] = $this->input->post('callsign', TRUE);
|
||||
$data['userid'] = $this->input->post('userid', TRUE);
|
||||
$data['slug'] = $this->input->post('slug', TRUE);
|
||||
|
||||
if($this->input->post('widget') != 'true') {
|
||||
$this->load->view('oqrs/request_grouped', $data);
|
||||
|
||||
@@ -79,9 +79,9 @@ class Widgets extends CI_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function oqrs($user_callsign = 'CALL MISSING') {
|
||||
public function oqrs($slug) {
|
||||
$this->load->model('oqrs_model');
|
||||
$data['slug'] = $this->input->get('slug', TRUE);
|
||||
$data['slug'] = $this->security->xss_clean($slug);
|
||||
$this->load->model('publicsearch');
|
||||
$data['userid'] = $this->publicsearch->get_userid_for_slug($data['slug']);
|
||||
$stations = $this->oqrs_model->get_oqrs_stations($data['userid']);
|
||||
@@ -109,7 +109,7 @@ class Widgets extends CI_Controller {
|
||||
$data['theme'] = $this->config->item('option_theme');
|
||||
}
|
||||
|
||||
$data['user_callsign'] = strtoupper($this->security->xss_clean($user_callsign));
|
||||
$data['user_callsign'] = strtoupper($this->security->xss_clean($slug));
|
||||
$this->load->view('widgets/oqrs', $data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user