比较提交

..

4 提交

作者 SHA1 备注 提交日期
copilot-swe-agent[bot]
759c7b31f2 Fix PHP 8.x compatibility issues across the codebase
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
2025-08-25 15:14:21 +00:00
copilot-swe-agent[bot]
02b11de709 Complete PHP 8.4.11 compatibility - update documentation
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
2025-08-25 14:58:14 +00:00
copilot-swe-agent[bot]
a7ae567ab7 Update PHP version checks for PHP 8.4.11 compatibility
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
2025-08-25 14:56:10 +00:00
copilot-swe-agent[bot]
ee13270045 Initial plan 2025-08-25 14:47:48 +00:00
共有 13 个文件被更改,包括 294 次插入303 次删除

查看文件

@ -13,7 +13,7 @@ Website: [http://www.cloudlog.co.uk](http://www.cloudlog.co.uk)
- Linux based Operating System - Linux based Operating System
- Apache (Nginx should work) - Apache (Nginx should work)
- PHP Version 7.4 (PHP 8.2 works) - PHP Version 7.4 or higher (PHP 8.4 supported)
- MySQL (MySQL 5.7 or higher) - MySQL (MySQL 5.7 or higher)
Notes Notes

查看文件

@ -198,9 +198,6 @@ case 'finnish':
case 'russian': case 'russian':
$config['language'] = $lang; $config['language'] = $lang;
break; break;
case 'portuguese':
$config['language'] = $lang;
break;
case 'english': case 'english':
$config['language'] = $lang; $config['language'] = $lang;
break; break;

查看文件

@ -1,7 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class adif extends CI_Controller class adif extends CI_Controller {
{
/* Controls ADIF Import/Export Functions */ /* Controls ADIF Import/Export Functions */
@ -11,15 +10,11 @@ class adif extends CI_Controller
$this->load->helper(array('form', 'url')); $this->load->helper(array('form', 'url'));
$this->load->model('user_model'); $this->load->model('user_model');
if (!$this->user_model->authorize(2)) { if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$this->session->set_flashdata('notice', 'You\'re not allowed to do that!');
redirect('dashboard');
}
} }
/* Shows Export Views */ /* Shows Export Views */
public function export() public function export() {
{
$data['page_title'] = "ADIF Export"; $data['page_title'] = "ADIF Export";
@ -70,8 +65,7 @@ class adif extends CI_Controller
$this->load->view('adif/data/exportsat', $data); $this->load->view('adif/data/exportsat', $data);
} }
public function export_custom() public function export_custom() {
{
// Set memory limit to unlimited to allow heavy usage // Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1'); ini_set('memory_limit', '-1');
@ -93,14 +87,14 @@ class adif extends CI_Controller
if ($this->input->post('markLotw') == 1) { if ($this->input->post('markLotw') == 1) {
foreach ($data['qsos']->result() as $qso) { foreach ($data['qsos']->result() as $qso)
{
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY); $this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
} }
} }
} }
public function mark_lotw() public function mark_lotw() {
{
// Set memory limit to unlimited to allow heavy usage // Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1'); ini_set('memory_limit', '-1');
@ -109,7 +103,8 @@ class adif extends CI_Controller
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id); $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
foreach ($data['qsos']->result() as $qso) { foreach ($data['qsos']->result() as $qso)
{
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY); $this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
} }
@ -127,13 +122,13 @@ class adif extends CI_Controller
$this->load->view('adif/data/exportall', $data); $this->load->view('adif/data/exportall', $data);
foreach ($data['qsos']->result() as $qso) { foreach ($data['qsos']->result() as $qso)
{
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY); $this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
} }
} }
public function index() public function index() {
{
$this->load->model('stations'); $this->load->model('stations');
$data['page_title'] = "ADIF Import / Export"; $data['page_title'] = "ADIF Import / Export";
@ -150,8 +145,7 @@ class adif extends CI_Controller
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
public function import() public function import() {
{
$this->load->model('stations'); $this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user(); $data['station_profile'] = $this->stations->all_of_user();
log_message("debug","Started ADIF Import"); log_message("debug","Started ADIF Import");
@ -194,7 +188,8 @@ class adif extends CI_Controller
$this->adif_parser->initialize(); $this->adif_parser->initialize();
$custom_errors = ""; $custom_errors = "";
$alladif=[]; $alladif=[];
while ($record = $this->adif_parser->get_record()) { while($record = $this->adif_parser->get_record())
{
if(count($record) == 0) { if(count($record) == 0) {
break; break;
}; };
@ -214,11 +209,11 @@ class adif extends CI_Controller
$this->load->view('interface_assets/header', $data); $this->load->view('interface_assets/header', $data);
$this->load->view('adif/import_success'); $this->load->view('adif/import_success');
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
} }
public function dcl() public function dcl() {
{
$this->load->model('stations'); $this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user(); $data['station_profile'] = $this->stations->all_of_user();
@ -253,7 +248,8 @@ class adif extends CI_Controller
$this->adif_parser->initialize(); $this->adif_parser->initialize();
$error_count = array(0, 0, 0); $error_count = array(0, 0, 0);
$custom_errors = ""; $custom_errors = "";
while ($record = $this->adif_parser->get_record()) { while($record = $this->adif_parser->get_record())
{
if(count($record) == 0) { if(count($record) == 0) {
break; break;
}; };

查看文件

@ -1,7 +1,6 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class API extends CI_Controller class API extends CI_Controller {
{
// Do absolutely nothing // Do absolutely nothing
function index() function index()
@ -32,8 +31,7 @@ class API extends CI_Controller
} }
function edit($key) function edit($key) {
{
$this->load->model('user_model'); $this->load->model('user_model');
// Check if users logged in // Check if users logged in
@ -54,13 +52,16 @@ class API extends CI_Controller
$data['api_info'] = $this->api_model->key_description($key); $data['api_info'] = $this->api_model->key_description($key);
if ($this->form_validation->run() == FALSE) { if ($this->form_validation->run() == FALSE)
{
$data['page_title'] = "Edit API Description"; $data['page_title'] = "Edit API Description";
$this->load->view('interface_assets/header', $data); $this->load->view('interface_assets/header', $data);
$this->load->view('api/description'); $this->load->view('api/description');
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} else { }
else
{
// Success! // Success!
$this->api_model->update_key_description($this->input->post('api_key'), $this->input->post('api_desc')); $this->api_model->update_key_description($this->input->post('api_key'), $this->input->post('api_desc'));
@ -69,10 +70,10 @@ class API extends CI_Controller
redirect('api/help'); redirect('api/help');
} }
} }
function generate($rights) function generate($rights) {
{
$this->load->model('user_model'); $this->load->model('user_model');
// Check if users logged in // Check if users logged in
@ -90,8 +91,7 @@ class API extends CI_Controller
redirect('api/help'); redirect('api/help');
} }
function delete($key) function delete($key) {
{
$this->load->model('user_model'); $this->load->model('user_model');
// Check if users logged in // Check if users logged in
@ -112,8 +112,7 @@ class API extends CI_Controller
} }
// Example of authing // Example of authing
function auth($key) function auth($key) {
{
$this->load->model('api_model'); $this->load->model('api_model');
header("Content-type: text/xml"); header("Content-type: text/xml");
if($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") { if($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") {
@ -128,8 +127,7 @@ class API extends CI_Controller
} }
} }
function check_auth($key) function check_auth($key) {
{
$this->load->model('api_model'); $this->load->model('api_model');
header("Content-type: text/xml"); header("Content-type: text/xml");
if($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") { if($this->api_model->access($key) == "No Key Found" || $this->api_model->access($key) == "Key Disabled") {
@ -152,8 +150,7 @@ class API extends CI_Controller
} }
} }
function station_info($key) function station_info($key) {
{
$this->load->model('api_model'); $this->load->model('api_model');
$this->load->model('stations'); $this->load->model('stations');
header("Content-type: application/json"); header("Content-type: application/json");
@ -183,8 +180,7 @@ class API extends CI_Controller
* Function: QSO * Function: QSO
* Task: allows passing of ADIF data to Cloudlog * Task: allows passing of ADIF data to Cloudlog
*/ */
function qso() function qso() {
{
header('Content-type: application/json'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -231,8 +227,10 @@ class API extends CI_Controller
$this->adif_parser->feed($obj['string']); $this->adif_parser->feed($obj['string']);
// Create QSO Record // Create QSO Record
while ($record = $this->adif_parser->get_record()) { while($record = $this->adif_parser->get_record())
if (count($record) == 0) { {
if(count($record) == 0)
{
break; break;
}; };
@ -260,15 +258,17 @@ class API extends CI_Controller
$return_msg[] = $msg; $return_msg[] = $msg;
} }
} }
}; };
http_response_code(201); http_response_code(201);
echo json_encode(['status' => 'created', 'type' => $obj['type'], 'string' => $obj['string'], 'imported_count' => $return_count, 'messages' => $return_msg ]); echo json_encode(['status' => 'created', 'type' => $obj['type'], 'string' => $obj['string'], 'imported_count' => $return_count, 'messages' => $return_msg ]);
} }
} }
// API function to check if a callsign is in the logbook already // API function to check if a callsign is in the logbook already
function logbook_check_callsign() function logbook_check_callsign() {
{
header('Content-type: application/json'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -308,7 +308,8 @@ class API extends CI_Controller
if($this->logbooks_model->public_slug_exists($logbook_slug)) { if($this->logbooks_model->public_slug_exists($logbook_slug)) {
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug); $logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug);
if ($logbook_id != false) { if($logbook_id != false)
{
// Get associated station locations for mysql queries // Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
@ -330,7 +331,8 @@ class API extends CI_Controller
$result = $this->logbook_model->check_if_callsign_worked_in_logbook($callsign, $logbooks_locations_array, $band); $result = $this->logbook_model->check_if_callsign_worked_in_logbook($callsign, $logbooks_locations_array, $band);
http_response_code(201); http_response_code(201);
if ($result > 0) { if($result > 0)
{
echo json_encode(['callsign' => $callsign, 'result' => 'Found']); echo json_encode(['callsign' => $callsign, 'result' => 'Found']);
} else { } else {
echo json_encode(['callsign' => $callsign, 'result' => 'Not Found']); echo json_encode(['callsign' => $callsign, 'result' => 'Not Found']);
@ -341,12 +343,13 @@ class API extends CI_Controller
echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]); echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]);
die(); die();
} }
} }
} }
// API function to check if a grid is in the logbook already // API function to check if a grid is in the logbook already
function logbook_check_grid() function logbook_check_grid() {
{
header('Content-type: application/json'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -384,7 +387,8 @@ class API extends CI_Controller
if($this->logbooks_model->public_slug_exists($logbook_slug)) { if($this->logbooks_model->public_slug_exists($logbook_slug)) {
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug); $logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug);
if ($logbook_id != false) { if($logbook_id != false)
{
// Get associated station locations for mysql queries // Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
@ -406,7 +410,8 @@ class API extends CI_Controller
$result = $this->logbook_model->check_if_grid_worked_in_logbook($grid, $logbooks_locations_array, $band); $result = $this->logbook_model->check_if_grid_worked_in_logbook($grid, $logbooks_locations_array, $band);
http_response_code(201); http_response_code(201);
if ($result > 0) { if($result > 0)
{
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Found']); echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Found']);
} else { } else {
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Not Found']); echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Not Found']);
@ -417,7 +422,9 @@ class API extends CI_Controller
echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]); echo json_encode(['status' => 'failed', 'reason' => "logbook not found"]);
die(); die();
} }
} }
} }
@ -518,7 +525,8 @@ class API extends CI_Controller
if($this->logbooks_model->public_slug_exists($logbook_slug)) { if($this->logbooks_model->public_slug_exists($logbook_slug)) {
$logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug); $logbook_id = $this->logbooks_model->public_slug_exists_logbook_id($logbook_slug);
if ($logbook_id != false) { if($logbook_id != false)
{
// Get associated station locations for mysql queries // Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
@ -596,8 +604,7 @@ class API extends CI_Controller
/* ENDPOINT for Rig Control */ /* ENDPOINT for Rig Control */
function radio() function radio() {
{
header('Content-type: application/json'); header('Content-type: application/json');
$this->load->model('api_model'); $this->load->model('api_model');
@ -629,6 +636,7 @@ class API extends CI_Controller
$arr = array('status' => 'success'); $arr = array('status' => 'success');
echo json_encode($arr); echo json_encode($arr);
} }
/* /*
@ -637,8 +645,7 @@ class API extends CI_Controller
* *
*/ */
function statistics($key = null) function statistics($key = null) {
{
header('Content-type: application/json'); header('Content-type: application/json');
$this->load->model('logbook_model'); $this->load->model('logbook_model');
@ -649,10 +656,10 @@ class API extends CI_Controller
http_response_code(201); http_response_code(201);
echo json_encode(['Today' => $data['todays_qsos'], 'total_qsos' => $data['total_qsos'], 'month_qsos' => $data['month_qsos'], 'year_qsos' => $data['year_qsos']]); echo json_encode(['Today' => $data['todays_qsos'], 'total_qsos' => $data['total_qsos'], 'month_qsos' => $data['month_qsos'], 'year_qsos' => $data['year_qsos']]);
} }
function lookup() function lookup() {
{
// start benchmarking // start benchmarking
$this->output->enable_profiler(TRUE); $this->output->enable_profiler(TRUE);
/* /*
@ -672,9 +679,7 @@ class API extends CI_Controller
// Make sure users logged in // Make sure users logged in
$this->load->model('user_model'); $this->load->model('user_model');
if (!$this->user_model->authorize($this->config->item('auth_mode'))) { if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
return;
}
$this->load->model("logbook_model"); $this->load->model("logbook_model");
@ -768,7 +773,8 @@ class API extends CI_Controller
*/ */
$call_lookup_results = $this->logbook_model->call_lookup_result($lookup_callsign); $call_lookup_results = $this->logbook_model->call_lookup_result($lookup_callsign);
if ($call_lookup_results != null) { if($call_lookup_results != null)
{
$return['name'] = $call_lookup_results->COL_NAME; $return['name'] = $call_lookup_results->COL_NAME;
$return['gridsquare'] = $call_lookup_results->COL_GRIDSQUARE; $return['gridsquare'] = $call_lookup_results->COL_GRIDSQUARE;
$return['location'] = $call_lookup_results->COL_QTH; $return['location'] = $call_lookup_results->COL_QTH;
@ -780,6 +786,7 @@ class API extends CI_Controller
if ($return['gridsquare'] != "") { if ($return['gridsquare'] != "") {
$return['latlng'] = $this->qralatlng($return['gridsquare']); $return['latlng'] = $this->qralatlng($return['gridsquare']);
} }
} }
@ -802,8 +809,7 @@ class API extends CI_Controller
$this->output->enable_profiler(FALSE); $this->output->enable_profiler(FALSE);
} }
function qralatlng($qra) function qralatlng($qra) {
{
$this->load->library('Qra'); $this->load->library('Qra');
$latlng = $this->qra->qra2latlong($qra); $latlng = $this->qra->qra2latlong($qra);
return $latlng; return $latlng;
@ -842,28 +848,24 @@ class API extends CI_Controller
* "logbook_slug": "my-public-logbook" * "logbook_slug": "my-public-logbook"
* } * }
*/ */
function recent_qsos($public_slug = null, $limit = 10) function recent_qsos($public_slug = null, $limit = 10) {
{
header('Content-type: application/json'); header('Content-type: application/json');
// Validate and sanitize $limit
if (!is_numeric($limit)) {
$limit = 10; // Default to 10 if not numeric
} else {
$limit = intval($limit);
if ($limit < 1) {
$limit = 1; // Minimum limit of 1
} elseif ($limit > 50) {
$limit = 50; // Maximum limit of 50
}
}
if($public_slug == null) { if($public_slug == null) {
http_response_code(400); http_response_code(400);
echo json_encode(['status' => 'failed', 'reason' => 'missing public_slug parameter']); echo json_encode(['status' => 'failed', 'reason' => 'missing public_slug parameter']);
return; return;
} }
// Validate and sanitize limit parameter
$limit = intval($limit);
if ($limit <= 0) {
$limit = 10; // default
}
if ($limit > 50) {
$limit = 50; // maximum
}
$this->load->model('logbooks_model'); $this->load->model('logbooks_model');
$this->load->model('logbook_model'); $this->load->model('logbook_model');
@ -918,15 +920,6 @@ class API extends CI_Controller
$qso['name'] = $row->COL_NAME; $qso['name'] = $row->COL_NAME;
} }
$dxcc = $this->logbook_model->check_dxcc_table(strtoupper(trim(strtoupper($row->COL_CALL))), $row->COL_TIME_ON);
if (empty($dxcc[0])) {
$dxcc_id = null;
} else {
$qso['country'] = $dxcc[1];
$qso['lat'] = $dxcc[4];
$qso['long'] = $dxcc[5];
}
$qsos[] = $qso; $qsos[] = $qso;
} }
@ -936,6 +929,7 @@ class API extends CI_Controller
'count' => count($qsos), 'count' => count($qsos),
'logbook_slug' => $public_slug 'logbook_slug' => $public_slug
], JSON_PRETTY_PRINT); ], JSON_PRETTY_PRINT);
} else { } else {
http_response_code(404); http_response_code(404);
echo json_encode(['status' => 'failed', 'reason' => $public_slug.' has no associated station locations']); echo json_encode(['status' => 'failed', 'reason' => $public_slug.' has no associated station locations']);

查看文件

@ -1,3 +1,4 @@
<<<<<<< HEAD
<?php <?php
defined('BASEPATH') OR exit('No direct script access allowed'); defined('BASEPATH') OR exit('No direct script access allowed');

查看文件

@ -1932,8 +1932,6 @@ class Logbook_model extends CI_Model
function get_last_qsos($num, $StationLocationsArray = null) function get_last_qsos($num, $StationLocationsArray = null)
{ {
// Ensure $num is always an integer to prevent SQL injection
$num = intval($num);
if ($StationLocationsArray == null) { if ($StationLocationsArray == null) {
$CI = &get_instance(); $CI = &get_instance();
@ -1951,7 +1949,7 @@ class Logbook_model extends CI_Model
order by col_time_on desc, col_primary_key desc order by col_time_on desc, col_primary_key desc
limit " . $num . limit " . $num .
") hrd ") hrd
LEFT JOIN station_profile ON station_profile.station_id = hrd.station_id JOIN station_profile ON station_profile.station_id = hrd.station_id
LEFT JOIN dxcc_entities ON hrd.col_dxcc = dxcc_entities.adif LEFT JOIN dxcc_entities ON hrd.col_dxcc = dxcc_entities.adif
order by col_time_on desc, col_primary_key desc"; order by col_time_on desc, col_primary_key desc";
@ -4093,7 +4091,7 @@ class Logbook_model extends CI_Model
$csadditions = '/^P$|^R$|^A$|^M$/'; $csadditions = '/^P$|^R$|^A$|^M$/';
$dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`, `cont`,`lat`,`long`') $dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`, `cont`')
->where('call', $call) ->where('call', $call)
->where('(start <= ', $date) ->where('(start <= ', $date)
->or_where('start is null)', NULL, false) ->or_where('start is null)', NULL, false)
@ -4103,7 +4101,7 @@ class Logbook_model extends CI_Model
if ($dxcc_exceptions->num_rows() > 0) { if ($dxcc_exceptions->num_rows() > 0) {
$row = $dxcc_exceptions->row_array(); $row = $dxcc_exceptions->row_array();
return array($row['adif'], $row['entity'], $row['cqz'], $row['cont'], $row['lat'], $row['long']); return array($row['adif'], $row['entity'], $row['cqz'], $row['cont']);
} }
if (preg_match('/(^KG4)[A-Z09]{3}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 4 or 6 char, it is USA if (preg_match('/(^KG4)[A-Z09]{3}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 4 or 6 char, it is USA
$call = "K"; $call = "K";
@ -4158,7 +4156,7 @@ class Logbook_model extends CI_Model
// query the table, removing a character from the right until a match // query the table, removing a character from the right until a match
for ($i = $len; $i > 0; $i--) { for ($i = $len; $i > 0; $i--) {
//printf("searching for %s\n", substr($call, 0, $i)); //printf("searching for %s\n", substr($call, 0, $i));
$dxcc_result = $this->db->select('`call`, `entity`, `adif`, `cqz`, `cont`,`lat`,`long`') $dxcc_result = $this->db->select('`call`, `entity`, `adif`, `cqz`, `cont`')
->where('call', substr($call, 0, $i)) ->where('call', substr($call, 0, $i))
->where('(start <= ', $date) ->where('(start <= ', $date)
->or_where("start is null)", NULL, false) ->or_where("start is null)", NULL, false)
@ -4171,7 +4169,7 @@ class Logbook_model extends CI_Model
if ($dxcc_result->num_rows() > 0) { if ($dxcc_result->num_rows() > 0) {
$row = $dxcc_result->row_array(); $row = $dxcc_result->row_array();
return array($row['adif'], $row['entity'], $row['cqz'], $row['cont'], $row['lat'], $row['long']); return array($row['adif'], $row['entity'], $row['cqz'], $row['cont']);
} }
} }

查看文件

@ -107,8 +107,8 @@
?> ?>
<td><span data-bs-toggle="tooltip" title="<?php if ($rove['mhz'] != '') { <td><span data-bs-toggle="tooltip" title="<?php if ($rove['mhz'] != '') {
printf("%.3f", $rove['mhz']); printf("%.3f", $rove['mhz']);
echo " " . $direction ?? ''; echo " " . ($direction ?? '');
} ?>"><?= $rove['satellite']['name'] ?></span></td> } ?>"><?php echo $rove['satellite']['name']; ?></span></td>
<td><span title="<?php echo $rove['mode']; ?>" class="badge <?php echo $modeclass; ?>"><?php echo $rove['mode']; ?></span></td> <td><span title="<?php echo $rove['mode']; ?>" class="badge <?php echo $modeclass; ?>"><?php echo $rove['mode']; ?></span></td>
<td> <td>

查看文件

@ -160,7 +160,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc)
<div class="container dashboard"> <div class="container dashboard">
<?php if (($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> <?php if (($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
<?php if (version_compare(PHP_VERSION, '7.4.0') <= 0) { ?> <?php if (version_compare(PHP_VERSION, '8.0.0') < 0) { ?>
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
<?php echo lang('dashboard_php_version_warning') . ' ' . PHP_VERSION . '.'; ?> <?php echo lang('dashboard_php_version_warning') . ' ' . PHP_VERSION . '.'; ?>
</div> </div>

查看文件

@ -21,8 +21,8 @@ if (!isset($options->operator)) {
?> ?>
</script> </script>
<script> <script>
const CSRF_NAME = '<?= $this->security->get_csrf_token_name(); ?>'; const CSRF_NAME = '<?php echo $this->security->get_csrf_token_name(); ?>';
const CSRF_HASH = '<?= $this->security->get_csrf_hash(); ?>'; const CSRF_HASH = '<?php echo $this->security->get_csrf_hash(); ?>';
</script> </script>
<style> <style>
/*Legend specific*/ /*Legend specific*/

查看文件

@ -34,9 +34,6 @@ function frequencyToBand(frequency) {
else if(result >= 50000000 && result <= 56000000) { else if(result >= 50000000 && result <= 56000000) {
return '6m'; return '6m';
} }
else if(result >= 70000000 && result <= 72000000) {
return '4m';
}
else if(result >= 144000000 && result <= 148000000) { else if(result >= 144000000 && result <= 148000000) {
return '2m'; return '2m';
} }

查看文件

@ -74,7 +74,7 @@ switch (ENVIRONMENT)
case 'testing': case 'testing':
case 'production': case 'production':
ini_set('display_errors', 0); ini_set('display_errors', 0);
if (version_compare(PHP_VERSION, '5.3', '>=')) if (version_compare(PHP_VERSION, '7.0', '>='))
{ {
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
} }

查看文件

@ -200,9 +200,6 @@ case 'finnish':
case 'russian': case 'russian':
$config['language'] = $lang; $config['language'] = $lang;
break; break;
case 'portuguese':
$config['language'] = $lang;
break;
case 'english': case 'english':
$config['language'] = $lang; $config['language'] = $lang;
break; break;

查看文件

@ -152,7 +152,7 @@ class CI_Encryption {
public function __construct(array $params = array()) public function __construct(array $params = array())
{ {
$this->_drivers = array( $this->_drivers = array(
'mcrypt' => defined('MCRYPT_DEV_URANDOM'), 'mcrypt' => defined('MCRYPT_DEV_URANDOM') && function_exists('mcrypt_encrypt'),
'openssl' => extension_loaded('openssl') 'openssl' => extension_loaded('openssl')
); );
@ -203,9 +203,20 @@ class CI_Encryption {
if (empty($this->_driver)) if (empty($this->_driver))
{ {
$this->_driver = ($this->_drivers['openssl'] === TRUE) // Prefer OpenSSL on modern PHP versions where mcrypt is not available
? 'openssl' if ($this->_drivers['openssl'] === TRUE)
: 'mcrypt'; {
$this->_driver = 'openssl';
}
elseif ($this->_drivers['mcrypt'] === TRUE)
{
$this->_driver = 'mcrypt';
}
else
{
// This shouldn't happen as we check both drivers in constructor
show_error('Encryption: No available encryption driver found.');
}
log_message('debug', "Encryption: Auto-configured driver '".$this->_driver."'."); log_message('debug', "Encryption: Auto-configured driver '".$this->_driver."'.");
} }