diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 9cf88fbe..dcba3e51 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -136,14 +136,18 @@ class Logbook extends CI_Controller { $return['dxcc'] = $this->dxcheck($callsign); $split_callsign=explode('/',$callsign); - if (isset($split_callsign[1]) && ($split_callsign[1] != "")) { // Do we have "/" in Call? - if (strlen($split_callsign[1])>3) { // Last Element longer than 3 chars? Take that as call + if (count($split_callsign)==1) { // case F0ABC --> return cel 0 // + $lookupcall = $split_callsign[0]; + } else if (count($split_callsign)==3) { // case EA/F0ABC/P --> return cel 1 // + $lookupcall = $split_callsign[1]; + } else { // case F0ABC/P --> return cel 0 OR case EA/FOABC --> retunr 1 (normaly not exist) // + if (in_array(strtoupper($split_callsign[1]), array('P','M','MM','QRP','0','1','2','3','4','5','6','7','8','9'))) { + $lookupcall = $split_callsign[0]; + } else if (strlen($split_callsign[1])>3) { // Last Element longer than 3 chars? Take that as call $lookupcall = $split_callsign[1]; - } else { // Last Element up to 3 Chars? Take first element as Call + } else { // Last Element up to 3 Chars? Take first element as Call $lookupcall = $split_callsign[0]; } - } else { - $lookupcall=$callsign; } $return['partial'] = $this->partial($lookupcall); @@ -257,7 +261,7 @@ class Logbook extends CI_Controller { return false; } -function worked_grid_before($gridsquare, $type, $band, $mode) + function worked_grid_before($gridsquare, $type, $band, $mode) { if (strlen($gridsquare) < 4) return false; @@ -707,7 +711,11 @@ function worked_grid_before($gridsquare, $type, $band, $mode) $this->db->where_in('station_profile.station_id', $logbooks_locations_array); $this->db->order_by(''.$this->config->item('table_name').'.COL_TIME_ON', "desc"); - $this->db->like($this->config->item('table_name').'.COL_CALL', $id); + $this->db->where($this->config->item('table_name').'.COL_CALL', $id); + $this->db->or_like($this->config->item('table_name').'.COL_CALL', '/'.$id,'before'); + $this->db->or_like($this->config->item('table_name').'.COL_CALL', $id.'/','after'); + $this->db->or_like($this->config->item('table_name').'.COL_CALL', '/'.$id.'/'); + $this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "desc"); $this->db->limit(5); @@ -985,7 +993,7 @@ function worked_grid_before($gridsquare, $type, $band, $mode) if($data['callsign']['error'] == "Session does not exist or expired") { $hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password')); $this->session->set_userdata('hamqth_session_key', $hamqth_session_key); - $data['callsign'] = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key')); + $data['callsign'] = $this->hamqth->search($id, $this->session->userdata('hamqth_session_key')); } if (isset($data['callsign']['gridsquare'])) { $CI = &get_instance(); diff --git a/application/models/User_options_model.php b/application/models/User_options_model.php index 765f7a9d..f5cff23e 100644 --- a/application/models/User_options_model.php +++ b/application/models/User_options_model.php @@ -25,9 +25,9 @@ class User_options_model extends CI_Model { ON DUPLICATE KEY UPDATE option_value = ?'; foreach ($option_array as $option_key => $option_value) { $this->db->query($sql, array($user_id, $option_type, $option_name, $option_key, $option_value, $option_value)); - return true; } } + return true; } else { log_message('error','set_option_at_all_users() failed because users table is empty'); } diff --git a/application/views/awards/sig/index.php b/application/views/awards/sig/index.php index 2d19062b..53a15916 100644 --- a/application/views/awards/sig/index.php +++ b/application/views/awards/sig/index.php @@ -15,7 +15,7 @@ -
| Award Typediff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index d45ca998..0461142c 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -30,7 +30,6 @@ - @@ -1146,7 +1145,7 @@ $(document).on('keypress',function(e) { if ( ! manual ) { $(function($) { - resetTimers(); + resetTimers(0); }); } }); @@ -1183,7 +1182,7 @@ $(document).on('keypress',function(e) { if (e.key === "Escape") { // escape key maps to keycode `27` reset_fields(); if ( ! manual ) { - resetTimers() + resetTimers(0) } $('#callsign').val(""); $("#callsign").focus(); diff --git a/application/views/logbookadvanced/index.php b/application/views/logbookadvanced/index.php index 70376bd7..c2a3bd0b 100644 --- a/application/views/logbookadvanced/index.php +++ b/application/views/logbookadvanced/index.php @@ -10,6 +10,10 @@ if (!isset($options)) { $options = "{\"datetime\":{\"show\":\"true\"},\"de\":{\"show\":\"true\"},\"dx\":{\"show\":\"true\"},\"mode\":{\"show\":\"true\"},\"rstr\":{\"show\":\"true\"},\"rsts\":{\"show\":\"true\"},\"band\":{\"show\":\"true\"},\"myrefs\":{\"show\":\"true\"},\"refs\":{\"show\":\"true\"},\"name\":{\"show\":\"true\"},\"qslvia\":{\"show\":\"true\"},\"qsl\":{\"show\":\"true\"},\"lotw\":{\"show\":\"true\"},\"eqsl\":{\"show\":\"true\"},\"qslmsg\":{\"show\":\"true\"},\"dxcc\":{\"show\":\"true\"},\"state\":{\"show\":\"true\"},\"cqzone\":{\"show\":\"true\"},\"iota\":{\"show\":\"true\"},\"pota\":{\"show\":\"true\"},\"operator\":{\"show\":\"true\"}}"; } echo "var user_options = $options;"; +if (!isset($options->pota)) { + echo "\nvar o_template = { pota: {show: 'true'}};"; + echo "\nuser_options={...user_options, ...o_template}"; +} if (!isset($options->operator)) { echo "\nvar o_template = { operator: {show: 'true'}};"; echo "\nuser_options={...user_options, ...o_template}"; diff --git a/application/views/qso/edit_ajax.php b/application/views/qso/edit_ajax.php index 91d5f8bf..21533f85 100644 --- a/application/views/qso/edit_ajax.php +++ b/application/views/qso/edit_ajax.php @@ -19,7 +19,6 @@ - diff --git a/application/views/qso/index.php b/application/views/qso/index.php index ba10812f..5fb4acd4 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -5,7 +5,7 @@ |