mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Refactoring
This commit is contained in:
@@ -74,15 +74,22 @@ class Bandmap extends CI_Controller {
|
||||
|
||||
// Get user's favorite bands and modes (active ones)
|
||||
function get_user_favorites() {
|
||||
session_write_close();
|
||||
|
||||
$this->load->model('bands');
|
||||
$this->load->model('usermodes');
|
||||
|
||||
// Get active bands
|
||||
$activeBands = $this->bands->get_user_bands_for_qso_entry(false); // false = only active
|
||||
$bandList = [];
|
||||
foreach ($activeBands as $group => $bands) {
|
||||
foreach ($bands as $band) {
|
||||
$bandList[] = $band;
|
||||
|
||||
if (is_array($activeBands)) {
|
||||
foreach ($activeBands as $group => $bands) {
|
||||
if (is_array($bands)) {
|
||||
foreach ($bands as $band) {
|
||||
$bandList[] = $band;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,14 +101,16 @@ class Bandmap extends CI_Controller {
|
||||
'digi' => false
|
||||
];
|
||||
|
||||
foreach ($activeModes as $mode) {
|
||||
$qrgmode = strtoupper($mode->qrgmode ?? '');
|
||||
if ($qrgmode === 'CW') {
|
||||
$modeCategories['cw'] = true;
|
||||
} elseif ($qrgmode === 'SSB') {
|
||||
$modeCategories['phone'] = true;
|
||||
} elseif ($qrgmode === 'DATA') {
|
||||
$modeCategories['digi'] = true;
|
||||
if ($activeModes) {
|
||||
foreach ($activeModes as $mode) {
|
||||
$qrgmode = strtoupper($mode->qrgmode ?? '');
|
||||
if ($qrgmode === 'CW') {
|
||||
$modeCategories['cw'] = true;
|
||||
} elseif ($qrgmode === 'SSB') {
|
||||
$modeCategories['phone'] = true;
|
||||
} elseif ($qrgmode === 'DATA') {
|
||||
$modeCategories['digi'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
var lang_general_word_please_wait = "<?= __("Please Wait ..."); ?>";
|
||||
var lang_general_states_deprecated = "<?= _pgettext("Word for country states that are deprecated but kept for legacy reasons.", "deprecated"); ?>";
|
||||
var lang_gen_hamradio_sat_info = "<?= __("Satellite Information"); ?>";
|
||||
|
||||
var lang_notes_error_loading = "<?= __("Error loading notes"); ?>";
|
||||
var lang_notes_sort = "<?= __("Sorting"); ?>";
|
||||
var lang_notes_duplication_disabled = "<?= __("Duplication is disabled for Contacts notes"); ?>";
|
||||
|
||||
Reference in New Issue
Block a user