mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Resolves issue 1632. JSON-Array of stations will be returned if /index.php/api/station_info/[key] is called
This commit is contained in:
@@ -23,9 +23,12 @@ class Stations extends CI_Model {
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
function all_of_user() {
|
||||
function all_of_user($userid = null) {
|
||||
if ($userid == null) {
|
||||
$userid=$this->session->userdata('user_id'); // Fallback to session-uid, if userid is omitted
|
||||
}
|
||||
$this->db->select('station_profile.*, dxcc_entities.name as station_country, dxcc_entities.end as dxcc_end');
|
||||
$this->db->where('user_id', $this->session->userdata('user_id'));
|
||||
$this->db->where('user_id', $userid);
|
||||
$this->db->join('dxcc_entities','station_profile.station_dxcc = dxcc_entities.adif','left outer');
|
||||
return $this->db->get('station_profile');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user