Fix name change from ham.io to ham.li callsign lookup

这个提交包含在:
Graham McIntire 2014-06-06 16:46:38 -05:00
父节点 58913ff03e
当前提交 6ea51800a9
共有 3 个文件被更改,包括 111 次插入111 次删除

查看文件

@ -9,14 +9,14 @@
| 'app_name' Name of the App 'Cloudlog' | 'app_name' Name of the App 'Cloudlog'
| 'app_version' Set by the dev team. | 'app_version' Set by the dev team.
| 'directory' directory where cloudlog is installed eg "logger" | '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_name'] = "Cloudlog";
$config['app_version'] = "0.1"; $config['app_version'] = "0.1";
$config['directory'] = "logbook"; $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']; echo $callbook['gridsquare'];
} else { } else {
// Lookup using hamio // Lookup using hamli
$this->load->library('hamio'); $this->load->library('hamli');
$callbook = $this->hamio->callsign($qra); $callbook = $this->hamli->callsign($qra);
echo $callbook['gridsquare']; echo $callbook['gridsquare'];
} }
@ -161,10 +161,10 @@ class Logbook extends CI_Controller {
echo $callbook['city']; echo $callbook['city'];
} else { } else {
// Lookup using hamio // Lookup using hamli
$this->load->library('hamio'); $this->load->library('hamli');
$callbook = $this->hamio->callsign($callsign); $callbook = $this->hamli->callsign($callsign);
echo $callbook['city']; echo $callbook['city'];
} }
@ -209,10 +209,10 @@ class Logbook extends CI_Controller {
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key')); $callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
echo $callbook['name']; echo $callbook['name'];
} else { } else {
// Lookup using hamio // Lookup using hamli
$this->load->library('hamio'); $this->load->library('hamli');
$callbook = $this->hamio->callsign($callsign); $callbook = $this->hamli->callsign($callsign);
echo $callbook['name']; echo $callbook['name'];
} }
@ -257,8 +257,8 @@ class Logbook extends CI_Controller {
} }
echo "</table>"; echo "</table>";
} else { } else {
$this->load->library('hamio'); $this->load->library('hamli');
$data['callsign'] = $this->hamio->callsign($id); $data['callsign'] = $this->hamli->callsign($id);
$data['id'] = strtoupper($id); $data['id'] = strtoupper($id);
$this->load->view('search/result', $data); $this->load->view('search/result', $data);
@ -306,10 +306,10 @@ class Logbook extends CI_Controller {
} else { } else {
// Lookup using hamio // Lookup using hamli
$this->load->library('hamio'); $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'); <?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) public function callsign($callsign)
{ {
ini_set ('display_errors', 1); 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 = @file_get_contents($jsonurl,0,null,null);
$json_output = json_decode($json); $json_output = json_decode($json);
@ -62,4 +62,4 @@ class Hamio {
} }
} }
/* End of file hamio.php */ /* End of file hamli.php */