mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-25 11:32:35 +00:00
[QRZ Logbook] V2 fix for user_id
This commit is contained in:
@@ -108,7 +108,7 @@ class Qrz extends CI_Controller {
|
||||
|
||||
$data['page_title'] = "QRZ Logbook";
|
||||
|
||||
$data['station_profiles'] = $this->stations->all();
|
||||
$data['station_profiles'] = $this->stations->all_of_user();
|
||||
$data['station_profile'] = $this->stations->stations_with_qrz_api_key();
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
|
||||
@@ -383,7 +383,7 @@ class Logbook_model extends CI_Model {
|
||||
*/
|
||||
function exists_qrz_api_key($station_id) {
|
||||
$sql = 'select qrzapikey, qrzrealtime from station_profile
|
||||
where station_id = ' . $station_id;
|
||||
where station_id = ' . $station_id . ' and station_profile.user_id = ' . $this->session->userdata('user_id');
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
@@ -444,6 +444,10 @@ class Logbook_model extends CI_Model {
|
||||
* $primarykey is the unique id for that QSO in the logbook
|
||||
*/
|
||||
function mark_qrz_qsos_sent($primarykey) {
|
||||
if (!$this->check_qso_is_accessible($primarykey)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'COL_QRZCOM_QSO_UPLOAD_DATE' => date("Y-m-d H:i:s", strtotime("now")),
|
||||
'COL_QRZCOM_QSO_UPLOAD_STATUS' => 'Y',
|
||||
@@ -913,7 +917,8 @@ class Logbook_model extends CI_Model {
|
||||
' and (COL_QRZCOM_QSO_UPLOAD_STATUS is NULL
|
||||
or COL_QRZCOM_QSO_UPLOAD_STATUS = ""
|
||||
or COL_QRZCOM_QSO_UPLOAD_STATUS = "M"
|
||||
or COL_QRZCOM_QSO_UPLOAD_STATUS = "N")';
|
||||
or COL_QRZCOM_QSO_UPLOAD_STATUS = "N")
|
||||
and station_profile.user_id = ' . $this->session->userdata('user_id');
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
return $query;
|
||||
|
||||
@@ -269,7 +269,8 @@ class Stations extends CI_Model {
|
||||
" where COL_QRZCOM_QSO_UPLOAD_STATUS = 'Y'
|
||||
group by station_id
|
||||
) as totc on station_profile.station_id = totc.station_id
|
||||
where coalesce(station_profile.qrzapikey, '') <> ''";
|
||||
where coalesce(station_profile.qrzapikey, '') <> ''
|
||||
and station_profile.user_id = " . $this->session->userdata('user_id');
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query;
|
||||
|
||||
Reference in New Issue
Block a user