Added some extra bits to handle empty results
这个提交包含在:
父节点
3a83145e09
当前提交
be8771de2e
共有 2 个文件被更改,包括 37 次插入 和 9 次删除
|
|
@ -40,7 +40,7 @@ class Logbook extends CI_Controller {
|
||||||
$config['cur_tag_close'] = '</a></strong>';
|
$config['cur_tag_close'] = '</a></strong>';
|
||||||
|
|
||||||
$this->pagination->initialize($config);
|
$this->pagination->initialize($config);
|
||||||
|
|
||||||
//load the model and get results
|
//load the model and get results
|
||||||
$data['results'] = $this->logbook_model->get_qsos($config['per_page'],$this->uri->segment(3));
|
$data['results'] = $this->logbook_model->get_qsos($config['per_page'],$this->uri->segment(3));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -916,10 +916,14 @@ class Logbook_model extends CI_Model {
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_qsos($num, $offset) {
|
function get_qsos($num, $offset, $StationLocationsArray) {
|
||||||
$CI =& get_instance();
|
if($StationLocationsArray == null) {
|
||||||
$CI->load->model('logbooks_model');
|
$CI =& get_instance();
|
||||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
$CI->load->model('logbooks_model');
|
||||||
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
} else {
|
||||||
|
$logbooks_locations_array = $StationLocationsArray;
|
||||||
|
}
|
||||||
|
|
||||||
//$this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
|
//$this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
|
||||||
$this->db->from($this->config->item('table_name'));
|
$this->db->from($this->config->item('table_name'));
|
||||||
|
|
@ -1507,10 +1511,26 @@ class Logbook_model extends CI_Model {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
$QSLBreakdown['QSL_Sent'] = 0;
|
||||||
|
$QSLBreakdown['QSL_Received'] = 0;
|
||||||
|
$QSLBreakdown['QSL_Requested'] = 0;
|
||||||
|
$QSLBreakdown['eQSL_Sent'] = 0;
|
||||||
|
$QSLBreakdown['eQSL_Received'] = 0;
|
||||||
|
$QSLBreakdown['LoTW_Sent'] = 0;
|
||||||
|
$QSLBreakdown['LoTW_Received'] = 0;
|
||||||
|
|
||||||
|
return $QSLBreakdown;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
$QSLBreakdown['QSL_Sent'] = 0;
|
||||||
|
$QSLBreakdown['QSL_Received'] = 0;
|
||||||
|
$QSLBreakdown['QSL_Requested'] = 0;
|
||||||
|
$QSLBreakdown['eQSL_Sent'] = 0;
|
||||||
|
$QSLBreakdown['eQSL_Received'] = 0;
|
||||||
|
$QSLBreakdown['LoTW_Sent'] = 0;
|
||||||
|
$QSLBreakdown['LoTW_Received'] = 0;
|
||||||
|
|
||||||
|
return $QSLBreakdown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1766,10 +1786,18 @@ class Logbook_model extends CI_Model {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
$CountriesBreakdown['Countries_Worked'] = 0;
|
||||||
|
$CountriesBreakdown['Countries_Worked_QSL'] = 0;
|
||||||
|
$CountriesBreakdown['Countries_Worked_EQSL'] = 0;
|
||||||
|
$CountriesBreakdown['Countries_Worked_LOTW'] = 0;
|
||||||
|
return $CountriesBreakdown;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
$CountriesBreakdown['Countries_Worked'] = 0;
|
||||||
|
$CountriesBreakdown['Countries_Worked_QSL'] = 0;
|
||||||
|
$CountriesBreakdown['Countries_Worked_EQSL'] = 0;
|
||||||
|
$CountriesBreakdown['Countries_Worked_LOTW'] = 0;
|
||||||
|
return $CountriesBreakdown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用