Skip to content

Commit

Permalink
tag 2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbug authored Nov 14, 2023
2 parents 970edfa + 6ab636a commit c0c2998
Show file tree
Hide file tree
Showing 197 changed files with 2,800 additions and 1,389 deletions.
2 changes: 1 addition & 1 deletion application/config/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
|
*/

$config['migration_version'] = 150;
$config['migration_version'] = 152;

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/Contesting.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function checkIfWorkedBefore() {
$result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest);

header('Content-Type: application/json');
if ($result->num_rows()) {
if ($result && $result->num_rows()) {
echo json_encode(array('message' => 'Worked before'));
}
return;
Expand Down
98 changes: 47 additions & 51 deletions application/controllers/Debug.php
Original file line number Diff line number Diff line change
@@ -1,69 +1,65 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Debug extends CI_Controller {
function __construct()
{
parent::__construct();
function __construct()
{
parent::__construct();

$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
/* User Facing Links to Backup URLs */
public function index()
{
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}

/* User Facing Links to Backup URLs */
public function index()
{
$this->load->helper('file');

$this->load->model('MigrationVersion');

$data['migration_version'] = $this->MigrationVersion->getMigrationVersion();

// Test writing to backup folder
if ( ! write_file('backup/myfile.txt', "dummydata"))
{
$data['backup_folder'] = false;
}
else
{
if(unlink(realpath('backup/myfile.txt'))) {
$data['backup_folder'] = true;
} else {
$data['backup_folder'] = false;
}
}
$backup_folder = $this->is_really_writable('backup');
$data['backup_folder'] = $backup_folder;

// Test writing to updates folder
if ( ! write_file('updates/myfile.txt', "dummydata"))
{
$data['updates_folder'] = false;
}
else
{
if(unlink(realpath('updates/myfile.txt'))) {
$data['updates_folder'] = true;
} else {
$data['updates_folder'] = false;
}
}
$updates_folder = $this->is_really_writable('updates');
$data['updates_folder'] = $updates_folder;

// Test writing to uploads folder
if ( ! write_file('uploads/myfile.txt', "dummydata"))
{
$data['uploads_folder'] = false;
}
else
{
if(unlink(realpath('uploads/myfile.txt'))) {
$data['uploads_folder'] = true;
} else {
$data['uploads_folder'] = false;
}
}
$uploads_folder = $this->is_really_writable('uploads');
$data['uploads_folder'] = $uploads_folder;

$data['page_title'] = "Debug";

$this->load->view('interface_assets/header', $data);
$this->load->view('debug/main');
$this->load->view('interface_assets/footer');
}

$data['page_title'] = "Debug";
private function is_really_writable($folder)
{
// Get the absolute path to the folder
$path = FCPATH . $folder;

$this->load->view('interface_assets/header', $data);
$this->load->view('debug/main');
$this->load->view('interface_assets/footer');
}
// Check if the folder exists
if (!file_exists($path)) {
return false;
}

// Check if the folder is writable
if (is_writable($path)) {
// Check if the subdirectories are writable (recursive check)
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
foreach ($iterator as $item) {
if (!is_writable($item->getPathname())) {
return false;
}
}

return true;
}

}
return false;
}
}
2 changes: 1 addition & 1 deletion application/controllers/Distances.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getDistanceQsos(){

// Render Page
$data['page_title'] = "Log View - " . $distance;
$data['filter'] = "Filtering on QSOs with " . $distance . " and band ".$band;
$data['filter'] = lang('statistics_distances_qsos_with') . " " . $distance . " " . lang('statistics_distances_and_band'). " " . $band;
$this->load->view('awards/details', $data);
}
}
13 changes: 10 additions & 3 deletions application/controllers/Logbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -919,9 +919,16 @@ function search_result($id="", $id2="") {
}

$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
$CI = &get_instance();
$CI->load->model('logbook_model');
$data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
if (isset($data['callsign']['gridsquare'])) {
$CI = &get_instance();
$CI->load->model('logbook_model');
$data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
}
if (isset($data['callsign']['error'])) {
$data['error'] = $data['callsign']['error'];
}
} else {
$data['error'] = 'No result (qrz not configured)';
} /*else {
// Lookup using hamli
$this->load->library('hamli');
Expand Down
29 changes: 16 additions & 13 deletions application/controllers/Radio.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,13 @@ function json($id) {
$prop_mode = $row->prop_mode;

// Check Mode
$mode = strtoupper($row->mode);
if ($mode == "FMN") {
$mode = "FM";
if (isset($row->mode) && ($row->mode != null)) {
$mode = strtoupper($row->mode);
if ($mode == "FMN") {
$mode = "FM";
}
} else {
$mode=null;
}

if ($row->prop_mode == "SAT") {
Expand Down Expand Up @@ -156,16 +160,15 @@ function json($id) {
$updated_at = $minutes;

// Return Json data
echo json_encode(array(
"frequency" => $frequency,
"frequency_rx" => $frequency_rx,
"mode" => $mode,
"satmode" => $sat_mode,
"satname" => $sat_name,
"power" => $power,
"prop_mode" => $prop_mode,
"updated_minutes_ago" => $updated_at,
), JSON_PRETTY_PRINT);
$a_ret['frequency']=$frequency;
if (isset($frequency_rx) && ($frequency_rx != null)) { $a_ret['frequency_rx']=$frequency_rx; }
if (isset($mode) && ($mode != null)) { $a_ret['mode']=$mode; }
if (isset($sat_mode) && ($sat_mode != null)) { $a_ret['satmode']=$sat_mode; }
if (isset($sat_name) && ($sat_name != null)) { $a_ret['satname']=$sat_name; }
if (isset($power) && ($power != null)) { $a_ret['power']=$power; }
if (isset($prop_mode) && ($prop_mode != null)) { $a_ret['prop_mode']=$prop_mode; }
$a_ret['update_minutes_ago']=$updated_at;
echo json_encode($a_ret, JSON_PRETTY_PRINT);
}
}
}
Expand Down
20 changes: 20 additions & 0 deletions application/controllers/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ function add() {
$data['user_default_band'] = $this->input->post('user_default_band');
$data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : '');
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times');
$data['user_quicklog'] = $this->input->post('user_quicklog');
$data['user_quicklog_enter'] = $this->input->post('user_quicklog_enter');
$data['language'] = $this->input->post('language');
$this->load->view('user/add', $data);
} else {
Expand Down Expand Up @@ -127,6 +129,8 @@ function add() {
$this->input->post('user_default_band'),
($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : ''),
$this->input->post('user_qso_end_times'),
$this->input->post('user_quicklog'),
$this->input->post('user_quicklog_enter'),
$this->input->post('language'),
)) {
// Check for errors
Expand Down Expand Up @@ -175,6 +179,8 @@ function add() {
$data['user_default_band'] = $this->input->post('user_default_band');
$data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : '');
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times');
$data['user_quicklog'] = $this->input->post('user_quicklog');
$data['user_quicklog_enter'] = $this->input->post('user_quicklog_enter');
$data['language'] = $this->input->post('language');
$this->load->view('user/add', $data);
$this->load->view('interface_assets/footer');
Expand Down Expand Up @@ -398,6 +404,18 @@ function edit() {
$data['user_qso_end_times'] = $q->user_qso_end_times;
}

if($this->input->post('user_quicklog')) {
$data['user_quicklog'] = $this->input->post('user_quicklog', true);
} else {
$data['user_quicklog'] = $q->user_quicklog;
}

if($this->input->post('user_quicklog_enter')) {
$data['user_quicklog_enter'] = $this->input->post('user_quicklog_enter', true);
} else {
$data['user_quicklog_enter'] = $q->user_quicklog_enter;
}

if($this->input->post('user_show_profile_image')) {
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image', false);
} else {
Expand Down Expand Up @@ -539,6 +557,8 @@ function edit() {
$data['user_default_band'] = $this->input->post('user_default_band');
$data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : '');
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times');
$data['user_quicklog'] = $this->input->post('user_quicklog');
$data['user_quicklog_enter'] = $this->input->post('user_quicklog_enter');
$data['language'] = $this->input->post('language');
$data['user_winkey'] = $this->input->post('user_winkey');
$this->load->view('user/edit');
Expand Down
8 changes: 7 additions & 1 deletion application/language/bulgarian/account_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_quicklog_feature'] = "Quicklog Field";
$lang['account_quicklog_feature_hint'] = "With this feature, you can log callsigns using the search field in the header.";
$lang['account_quicklog_enter'] = "Quicklog - Action on press Enter";
$lang['account_quicklog_enter_hint'] = "What action should be performed when Enter is pressed in the quicklog field?";
$lang['account_quicklog_enter_log'] = "Log Callsign";
$lang['account_quicklog_enter_search'] = "Search Callsign";
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';
$lang['account_cloudlog_language'] = 'Cloudlog Language';
$lang['account_choose_cloudlog_language'] = 'Choose Cloudlog language.';

$lang['account_main_menu'] = 'Main Menu';
$lang['account_main_menu'] = 'Menu Options';
$lang['account_show_notes_in_the_main_menu'] = 'Show notes in the main menu.';

$lang['account_gridsquare_and_location_autocomplete'] = 'Gridsquare and Location Autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion application/language/bulgarian/adif_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// The File Input is translated by the Browser
$lang['adif_file_label'] = "ADIF File";

$lang['adif_hint_no_info_in_file'] ="Select if ADIF being imported does not contain this information.";
$lang['adif_hint_no_info_in_file'] = "Select if ADIF being imported does not contain this information.";

$lang['adif_import_dup'] = "Import duplicate QSOs";
$lang['adif_mark_imported_lotw'] = "Mark imported QSOs as uploaded to LoTW";
Expand Down
21 changes: 17 additions & 4 deletions application/language/bulgarian/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
$lang['general_word_disabled'] = "Disabled";
$lang['general_word_export'] = "Export";
$lang['general_word_import'] = "Import";
$lang['general_word_count'] = "Count";
$lang['general_word_filtering_on'] = "Filtering on";

$lang['general_word_date'] = 'Дата';
$lang['general_word_startdate'] = "Start Date";
$lang['general_word_enddate'] = "End Date";
$lang['general_word_time'] = 'Час';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
Expand All @@ -48,6 +52,7 @@
$lang['general_word_worked_not_confirmed'] = "Worked not confirmed";
$lang['general_word_not_worked'] = "Not worked";
$lang['general_word_confirmed'] = 'Потвърдени';
$lang['general_word_confirmation'] = "Confirmation";
$lang['general_word_needed'] = 'Необходими';

$lang['general_word_all'] = 'All';
Expand Down Expand Up @@ -109,6 +114,8 @@

$lang['gen_hamradio_call'] = 'Инициал';
$lang['gen_hamradio_callsign'] = 'Инициал';
$lang['gen_hamradio_prefix'] = "Prefix";
$lang['gen_hamradio_suffix'] = "Suffix";
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Режим';
Expand Down Expand Up @@ -138,6 +145,7 @@
$lang['gen_hamradio_satellite_mode'] = 'Режим на сателита';

$lang['gen_hamradio_logbook'] = 'Дневник';
$lang['gen_hamradio_award'] = "Award";

$lang['gen_hamradio_zones'] = 'Zones';
$lang['gen_hamradio_cq_zone'] = 'CQ зона';
Expand All @@ -159,17 +167,20 @@
$lang['gen_hamradio_pota'] = 'POTA';
$lang['gen_hamradio_gridsquare'] = 'Gridsquare';
$lang['gen_hamradio_get_gridsquare'] = 'Get Gridsquare';
$lang['gen_hamradio_latitude'] = "Latitude";
$lang['gen_hamradio_longitude'] = "Longitude";
$lang['gen_hamradio_bearing'] = "Bearing";
$lang['gen_hamradio_distance'] = 'Distance';
$lang['gen_hamradio_operator'] = 'Operator';

$lang['gen_hamradio_sig'] = 'Sig';
$lang['gen_hamradio_sig_info'] = 'Sig Info';

// Find your CQ/ITU Zone
$lang['gen_find_zone_cq_part1'] = "If you don't know your CQ Zone then ";
$lang['gen_find_zone_itu_part1'] = "If you don't know your ITU Zone then ";
$lang['gen_find_zone_part2'] = 'click here';
$lang['gen_find_zone_part3'] = ' to find it!';
$lang['gen_find_zone_cq_part1'] = "If you don't know your CQ Zone then";
$lang['gen_find_zone_itu_part1'] = "If you don't know your ITU Zone then";
$lang['gen_find_zone_part2'] = "click here";
$lang['gen_find_zone_part3'] = "to find it!";

// Dashboard Words
$lang['dashboard_you_have_had'] = 'Вие сте имали';
Expand Down Expand Up @@ -201,3 +212,5 @@
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';

$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.';
36 changes: 36 additions & 0 deletions application/language/bulgarian/gridsquares_lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

$lang['gridsquares_gridsquare_map'] = 'Gridsquare Map';
$lang['gridsquares_activated_gridsquare_map'] = "Activated Gridsquare Map";
$lang['gridsquares_gridsquare_activators'] = "Gridsquare Activators";

$lang['gridsquares_confirmed_is_green'] = 'Confirmed is Green';
$lang['gridsquares_worked_but_not_confirmed_is_red'] = 'Worked but not confirmed is Red';
$lang['gridsquares_activated_but_not_confirmed_is_red'] = 'Activated but not confirmed is Red';

$lang['gridsquares_this_map_does_not_include_satellite_internet_or_repeater_qsos'] = 'This map does not include satellite, internet or repeater QSOs';

$lang['gridsquares_grid_squares'] = 'grid square';
$lang['gridsquares_total_count'] = 'Total count';

$lang['gridsquares_minimum_count'] = "Minimum Count";
$lang['gridsquares_show_qsos'] = "Show QSO's";
$lang['gridsquares_show_map'] = "Show Map";
$lang['gridsquares_band'] = 'Band';
$lang['gridsquares_mode'] = 'Mode';
$lang['gridsquares_sat'] = 'Satellite';
$lang['gridsquares_confirmation'] = 'Confirmation';

$lang['gridsquares_button_plot'] = 'Plot';
$lang['gridsquares_button_clear_markers'] = "Clear Markers";

$lang['gridsquares_gridsquares'] = 'Gridsquares';
$lang['gridsquares_gridsquares_worked'] = 'Gridsquares worked';
$lang['gridsquares_gridsquares_confirmed'] = 'Gridsquares confirmed';
$lang['gridsquares_gridsquares_lotw'] = 'Gridsquares confirmed on LoTW';
$lang['gridsquares_gridsquares_paper'] = 'Gridsquares confirmed by paper QSL';
$lang['gridsquares_gridsquares_not_confirmed'] = 'Gridsquares not confirmed';
$lang['gridsquares_gridsquares_total_worked'] = 'Total gridsquares worked';
$lang['gridsquares_gridsquares_total_activated'] = 'Total gridsquares activated';
Loading

0 comments on commit c0c2998

Please sign in to comment.