mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
fix WAPC Award bands
This commit is contained in:
@@ -187,7 +187,7 @@ class Awards extends CI_Controller {
|
||||
$this->load->model('modes');
|
||||
$this->load->model('bands');
|
||||
|
||||
$data['worked_bands'] = ['160m','80m','40m','30m','20m','17m','15m','12m','10m','6m','2m','70cm'];;
|
||||
$data['worked_bands'] = $this->bands->get_worked_bands('wapc');
|
||||
$data['modes'] = $this->modes->active();
|
||||
|
||||
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
|
||||
|
||||
23
application/migrations/250_add_wapc_bandxuser.php
Normal file
23
application/migrations/250_add_wapc_bandxuser.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_wapc_bandxuser extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'wapc TINYINT NOT NULL DEFAULT 1',
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('wapc', 'bandxuser')) {
|
||||
$this->dbforge->add_column('bandxuser', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('wapc', 'bandxuser')) {
|
||||
$this->dbforge->drop_column('bandxuser', 'wapc');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,7 +309,7 @@ class WAPC extends CI_Model {
|
||||
} else if ($band == 'All') {
|
||||
$this->load->model('bands');
|
||||
|
||||
$bandslots = ['160m','80m','40m','30m','20m','17m','15m','12m','10m','6m','2m','70cm'];
|
||||
$bandslots = $this->bands->get_worked_bands('wapc');
|
||||
|
||||
$bandslots_list = "'".implode("','",$bandslots)."'";
|
||||
|
||||
@@ -344,7 +344,7 @@ class WAPC extends CI_Model {
|
||||
$bindings[]=$band;
|
||||
} else if ($band == 'All') {
|
||||
$this->load->model('bands');
|
||||
$bandslots = ['160m','80m','40m','30m','20m','17m','15m','12m','10m','6m','2m','70cm'];
|
||||
$bandslots = $this->bands->get_worked_bands('wapc');
|
||||
$bandslots_list = "'".implode("','",$bandslots)."'";
|
||||
$sql .= " and thcv.col_band in (" . $bandslots_list . ")";
|
||||
$sql .= " and thcv.col_prop_mode !='SAT'";
|
||||
|
||||
Reference in New Issue
Block a user