Refactor Logbook_model formatting and indentation

Standardized code formatting and indentation throughout Logbook_model.php for improved readability and maintainability. No functional changes were made; only whitespace, comment alignment, and consistent brace placement were updated.
这个提交包含在:
Peter Goodhall 2025-08-18 14:34:32 +01:00
父节点 adf658903b
当前提交 46155ba2de

查看文件

@ -118,7 +118,6 @@ class Logbook_model extends CI_Model
} }
if ($this->input->post('dxcc_id') == "") { if ($this->input->post('dxcc_id') == "") {
$dxcc = $this->check_dxcc_table(strtoupper(trim($callsign)), $datetime); $dxcc = $this->check_dxcc_table(strtoupper(trim($callsign)), $datetime);
if (empty($dxcc[0])) { if (empty($dxcc[0])) {
$dxcc_id = null; $dxcc_id = null;
@ -126,13 +125,12 @@ class Logbook_model extends CI_Model
$dxcc_id = $dxcc[0]; $dxcc_id = $dxcc[0];
} }
} else { } else {
// if $country isn't empty // if $country isn't empty and dxcc_id is 0 use the DXCC ID from the callsign lookup
if (!empty($country) && $this->input->post('dxcc_id') == "0") { if (!empty($country) && $this->input->post('dxcc_id') == "0") {
$dxcc_id = $dxcc_id; $dxcc_id = $dxcc_id;
} else { } else {
$dxcc_id = $this->input->post('dxcc_id'); $dxcc_id = $this->input->post('dxcc_id');
} }
} }
if ($this->input->post('continent') == "") { if ($this->input->post('continent') == "") {
@ -3008,7 +3006,8 @@ class Logbook_model extends CI_Model
} }
// Consolidated method to get all country statistics in one query // Consolidated method to get all country statistics in one query
function get_countries_statistics_consolidated($StationLocationsArray = null) { function get_countries_statistics_consolidated($StationLocationsArray = null)
{
if ($StationLocationsArray == null) { if ($StationLocationsArray == null) {
$CI = &get_instance(); $CI = &get_instance();
$CI->load->model('logbooks_model'); $CI->load->model('logbooks_model');
@ -4942,7 +4941,8 @@ class Logbook_model extends CI_Model
* @param array $batch_data Array of records from the ADIF file. * @param array $batch_data Array of records from the ADIF file.
* @return string HTML table rows for the processed batch. * @return string HTML table rows for the processed batch.
*/ */
public function process_qrz_batch($batch_data) { public function process_qrz_batch($batch_data)
{
$table = ""; $table = "";
$update_batch_data = []; $update_batch_data = [];
$this->load->model('Stations'); $this->load->model('Stations');
@ -5020,7 +5020,8 @@ class Logbook_model extends CI_Model
* @param string $user_format The user's preferred date format (e.g., 'd/m/Y', 'Y-m-d') * @param string $user_format The user's preferred date format (e.g., 'd/m/Y', 'Y-m-d')
* @return string Returns date in Y-m-d format for database storage, or original input if parsing fails * @return string Returns date in Y-m-d format for database storage, or original input if parsing fails
*/ */
private function parse_user_date($date_input, $user_format = null) { private function parse_user_date($date_input, $user_format = null)
{
if (empty($date_input)) { if (empty($date_input)) {
return $date_input; return $date_input;
} }