Fix name change from ham.io to ham.li callsign lookup
这个提交包含在:
父节点
58913ff03e
当前提交
6ea51800a9
共有 3 个文件被更改,包括 111 次插入 和 111 次删除
|
|
@ -9,14 +9,14 @@
|
|||
| 'app_name' Name of the App 'Cloudlog'
|
||||
| 'app_version' Set by the dev team.
|
||||
| 'directory' directory where cloudlog is installed eg "logger"
|
||||
| 'callbook' Selects which Callbook lookup to use defaults "hamio" but supports "qrz"
|
||||
| 'callbook' Selects which Callbook lookup to use defaults "hamli" but supports "qrz"
|
||||
*/
|
||||
|
||||
$config['app_name'] = "Cloudlog";
|
||||
$config['app_version'] = "0.1";
|
||||
$config['directory'] = "logbook";
|
||||
|
||||
$config['callbook'] = "qrz"; // Options are hamio or qrz
|
||||
$config['callbook'] = "qrz"; // Options are hamli or qrz
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -136,10 +136,10 @@ class Logbook extends CI_Controller {
|
|||
echo $callbook['gridsquare'];
|
||||
|
||||
} else {
|
||||
// Lookup using hamio
|
||||
$this->load->library('hamio');
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
||||
$callbook = $this->hamio->callsign($qra);
|
||||
$callbook = $this->hamli->callsign($qra);
|
||||
|
||||
echo $callbook['gridsquare'];
|
||||
}
|
||||
|
|
@ -161,10 +161,10 @@ class Logbook extends CI_Controller {
|
|||
echo $callbook['city'];
|
||||
|
||||
} else {
|
||||
// Lookup using hamio
|
||||
$this->load->library('hamio');
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
||||
$callbook = $this->hamio->callsign($callsign);
|
||||
$callbook = $this->hamli->callsign($callsign);
|
||||
|
||||
echo $callbook['city'];
|
||||
}
|
||||
|
|
@ -209,10 +209,10 @@ class Logbook extends CI_Controller {
|
|||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
|
||||
echo $callbook['name'];
|
||||
} else {
|
||||
// Lookup using hamio
|
||||
$this->load->library('hamio');
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
||||
$callbook = $this->hamio->callsign($callsign);
|
||||
$callbook = $this->hamli->callsign($callsign);
|
||||
|
||||
echo $callbook['name'];
|
||||
}
|
||||
|
|
@ -257,8 +257,8 @@ class Logbook extends CI_Controller {
|
|||
}
|
||||
echo "</table>";
|
||||
} else {
|
||||
$this->load->library('hamio');
|
||||
$data['callsign'] = $this->hamio->callsign($id);
|
||||
$this->load->library('hamli');
|
||||
$data['callsign'] = $this->hamli->callsign($id);
|
||||
$data['id'] = strtoupper($id);
|
||||
|
||||
$this->load->view('search/result', $data);
|
||||
|
|
@ -306,10 +306,10 @@ class Logbook extends CI_Controller {
|
|||
|
||||
|
||||
} else {
|
||||
// Lookup using hamio
|
||||
$this->load->library('hamio');
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
||||
$data['callsign'] = $this->hamio->callsign($id);
|
||||
$data['callsign'] = $this->hamli->callsign($id);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Hamio {
|
||||
class Hamli {
|
||||
|
||||
/*
|
||||
Communicates with the ham.io API functions
|
||||
Communicates with the ham.li API functions
|
||||
*/
|
||||
|
||||
public function callsign($callsign)
|
||||
{
|
||||
ini_set ('display_errors', 1);
|
||||
$jsonurl = "http://search.ham.io/api/call/".$callsign;
|
||||
$jsonurl = "http://search.ham.li/api/call/".$callsign;
|
||||
|
||||
$json = @file_get_contents($jsonurl,0,null,null);
|
||||
$json_output = json_decode($json);
|
||||
|
|
@ -62,4 +62,4 @@ class Hamio {
|
|||
}
|
||||
}
|
||||
|
||||
/* End of file hamio.php */
|
||||
/* End of file hamli.php */
|
||||
正在加载…
在新工单中引用