Trying to get full names working correctly
这个提交包含在:
父节点
593db48556
当前提交
4064418942
共有 3 个文件被更改,包括 24 次插入 和 11 次删除
|
|
@ -138,7 +138,8 @@ class Logbook extends CI_Controller {
|
|||
return;
|
||||
}
|
||||
|
||||
$callbook = $this->logbook_model->loadCallBook($callsign);
|
||||
|
||||
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('personal'));
|
||||
|
||||
|
||||
if (isset($callbook))
|
||||
|
|
@ -490,8 +491,8 @@ class Logbook extends CI_Controller {
|
|||
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
|
||||
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
|
||||
}
|
||||
|
||||
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
|
||||
echo("Part 1: ". (int)$this->config->item('personal'));
|
||||
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('personal'));
|
||||
}
|
||||
|
||||
// There's no hamli integration? Disabled for now.
|
||||
|
|
@ -544,11 +545,11 @@ class Logbook extends CI_Controller {
|
|||
$this->load->library('qrz');
|
||||
|
||||
if(!$this->session->userdata('qrz_session_key')) {
|
||||
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
|
||||
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'));
|
||||
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
|
||||
}
|
||||
|
||||
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
|
||||
echo ("Part 2: ". $this->config->item('personal'). "<br/>");
|
||||
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('qrz_password'), $this->config->item('personal'));
|
||||
} else {
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
|
|
|||
|
|
@ -54,8 +54,11 @@ class Qrz {
|
|||
}
|
||||
|
||||
|
||||
public function search($callsign, $key)
|
||||
public function search($callsign, $key, $private="dog")
|
||||
{
|
||||
echo("Callsign: ".$callsign."<br/>");
|
||||
echo("key: ".$key."<br/>");
|
||||
echo("FOOOOOO: ". $private."<br/>");
|
||||
$data = null;
|
||||
try {
|
||||
// URL to the XML Source
|
||||
|
|
@ -75,7 +78,12 @@ class Qrz {
|
|||
|
||||
// Return Required Fields
|
||||
$data['callsign'] = (string)$xml->Callsign->call;
|
||||
$data['name'] = (string)$xml->Callsign->fname . ' ' . (string)$xml->Callsign->name;
|
||||
|
||||
if ($private === true) {
|
||||
$data['name'] = (string)$xml->Callsign->fname . ' AAAA ' . (string)$xml->Callsign->name;
|
||||
} else {
|
||||
$data['name'] = (string)$xml->Callsign->fname;
|
||||
}
|
||||
$data['gridsquare'] = (string)$xml->Callsign->grid;
|
||||
$data['city'] = (string)$xml->Callsign->addr2;
|
||||
$data['lat'] = (string)$xml->Callsign->lat;
|
||||
|
|
|
|||
|
|
@ -2168,7 +2168,7 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
}
|
||||
|
||||
public function loadCallBook($callsign)
|
||||
public function loadCallBook($callsign, $personal=false)
|
||||
{
|
||||
$callbook = null;
|
||||
try {
|
||||
|
|
@ -2181,7 +2181,11 @@ class Logbook_model extends CI_Model {
|
|||
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
|
||||
}
|
||||
|
||||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
|
||||
|
||||
$personal = "foo";
|
||||
echo ("part 3: ". $personal. "<br/>");
|
||||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $this->config->item('qrz_password'), "foobar");
|
||||
echo ("part 4: ". $personal. "<br/>");
|
||||
}
|
||||
|
||||
if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
|
||||
|
|
|
|||
正在加载…
在新工单中引用