diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index ee1f078b5..56bd6de74 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -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. diff --git a/application/migrations/250_add_wapc_bandxuser.php b/application/migrations/250_add_wapc_bandxuser.php new file mode 100644 index 000000000..0f7f8c453 --- /dev/null +++ b/application/migrations/250_add_wapc_bandxuser.php @@ -0,0 +1,23 @@ +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'); + } + } +} diff --git a/application/models/Wapc.php b/application/models/Wapc.php index 465080a0b..a6db37c11 100644 --- a/application/models/Wapc.php +++ b/application/models/Wapc.php @@ -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'";