diff --git a/application/config/migration.php b/application/config/migration.php index 3f4099f4..ccb0fc54 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 92; +$config['migration_version'] = 93; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 224fa8d0..9b9c95ac 100755 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -153,7 +153,7 @@ class Logbook extends CI_Controller { $return['callsign_us_county'] = $this->logbook_model->call_us_county($callsign); $return['bearing'] = $this->bearing($return['callsign_qra'], $measurement_base, $station_id); $return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode); - if ($this->session->userdata('user_show_qrz_image')) { + if ($this->session->userdata('user_show_profile_image')) { if (isset($callbook)) { if ($callbook['image'] == "") { $return['image'] = "n/a"; @@ -181,7 +181,7 @@ class Logbook extends CI_Controller { $return['callsign_iota'] = $callbook['iota']; $return['callsign_state'] = $callbook['state']; $return['callsign_us_county'] = $callbook['us_county']; - if ($this->session->userdata('user_show_qrz_image')) { + if ($this->session->userdata('user_show_profile_image')) { if ($callbook['image'] == "") { $return['image'] = "n/a"; } else { diff --git a/application/controllers/User.php b/application/controllers/User.php index a2de73ce..7ce64d61 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -74,7 +74,7 @@ class User extends CI_Controller { $data['user_column3'] = $this->input->post('user_column3'); $data['user_column4'] = $this->input->post('user_column4'); $data['user_column5'] = $this->input->post('user_column5'); - $data['user_show_qrz_image'] = $this->input->post('user_show_qrz_image'); + $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $this->load->view('user/add', $data); } else { $this->load->view('user/add', $data); @@ -102,7 +102,7 @@ class User extends CI_Controller { $this->input->post('user_column3'), $this->input->post('user_column4'), $this->input->post('user_column5'), - $this->input->post('user_show_qrz_image'))) { + $this->input->post('user_show_profile_image'))) { // Check for errors case EUSERNAMEEXISTS: $data['username_error'] = 'Username '.$this->input->post('user_name').' already in use!'; @@ -139,7 +139,7 @@ class User extends CI_Controller { $data['user_column3'] = $this->input->post('user_column3'); $data['user_column4'] = $this->input->post('user_column4'); $data['user_column5'] = $this->input->post('user_column5'); - $data['user_show_qrz_image'] = $this->input->post('user_show_qrz_image'); + $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $this->load->view('user/add', $data); $this->load->view('interface_assets/footer'); } @@ -311,10 +311,10 @@ class User extends CI_Controller { $data['user_show_notes'] = $q->user_show_notes; } - if($this->input->post('user_show_qrz_image')) { - $data['user_show_qrz_image'] = $this->input->post('user_show_qrz_image', false); + if($this->input->post('user_show_profile_image')) { + $data['user_show_profile_image'] = $this->input->post('user_show_profile_image', false); } else { - $data['user_show_qrz_image'] = $q->user_show_qrz_image; + $data['user_show_profile_image'] = $q->user_show_profile_image; } if($this->input->post('user_column1')) { @@ -396,7 +396,7 @@ class User extends CI_Controller { $data['user_column4'] = $this->input->post('user_column4'); $data['user_column4'] = $this->input->post('user_column4'); $data['user_column5'] = $this->input->post('user_column5'); - $data['user_show_qrz_image'] = $this->input->post('user_show_qrz_image'); + $data['user_show_profile_image'] = $this->input->post('user_show_profile_image'); $this->load->view('user/edit'); $this->load->view('interface_assets/footer'); } diff --git a/application/language/english/qso_lang.php b/application/language/english/qso_lang.php index a59ce307..86ee6413 100644 --- a/application/language/english/qso_lang.php +++ b/application/language/english/qso_lang.php @@ -6,7 +6,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['qso_title_qso_map'] = 'QSO Map'; $lang['qso_title_suggestions'] = 'Suggestions'; $lang['qso_title_pervious_contacts'] = 'Previous Contacts'; -$lang['qso_title_image'] = 'Profile Picture from qrz.com'; +$lang['qso_title_image'] = 'Profile Picture'; // Input Help Text on the /QSO Display $lang['qso_transmit_power_helptext'] = 'Give power value in Watts. Include only numbers in the input.'; diff --git a/application/language/german/qso_lang.php b/application/language/german/qso_lang.php index 3d3bac52..129fe752 100644 --- a/application/language/german/qso_lang.php +++ b/application/language/german/qso_lang.php @@ -6,7 +6,7 @@ defined('BASEPATH') OR exit('Direkter Zugriff auf Skripte ist nicht erlaubt'); $lang['qso_title_qso_map'] = 'QSO-Karte'; $lang['qso_title_suggestions'] = 'Vorschläge'; $lang['qso_title_pervious_contacts'] = 'Vorherige Kontakte'; -$lang['qso_title_image'] = 'Profilbild von qrz.com'; +$lang['qso_title_image'] = 'Profilbild'; // Input Help Text on the /QSO Display $lang['qso_transmit_power_helptext'] = 'Gib die Ausgangsleistung in Watt an. Erfasse nur Zahlen bei der Eingabe.'; diff --git a/application/libraries/Hamqth.php b/application/libraries/Hamqth.php index b347b47e..f2646735 100644 --- a/application/libraries/Hamqth.php +++ b/application/libraries/Hamqth.php @@ -81,6 +81,7 @@ class Hamqth { $data['lat'] = (string)$xml->search->latitude; $data['long'] = (string)$xml->search->longitude; $data['iota'] = (string)$xml->search->iota; + $data['image'] = (string)$xml->search->picture; $data['us_state'] = (string)$xml->search->us_state; $data['us_county'] = (string)$xml->search->us_county; $data['error'] = (string)$xml->session->error; diff --git a/application/migrations/093_rename_profile_images.php b/application/migrations/093_rename_profile_images.php new file mode 100644 index 00000000..9961adf3 --- /dev/null +++ b/application/migrations/093_rename_profile_images.php @@ -0,0 +1,34 @@ +db->field_exists('user_show_qrz_image', 'users')) { + $fields = array( + 'user_show_qrz_image' => [ 'name' => 'user_show_profile_image', 'type' => ' BOOLEAN DEFAULT FALSE', ] + ); + $this->dbforge->modify_column('users', $fields); + } + } + + public function down() + { + if ($this->db->field_exists('user_show_profile_image', 'users')) { + $fields = array( + 'user_show_profile_image' => [ 'name' => 'user_show_qrz_image', 'type' => ' BOOLEAN DEFAULT FALSE', ] + ); + $this->dbforge->modify_column('users', $fields); + } + } +} diff --git a/application/models/User_model.php b/application/models/User_model.php index d9e2b360..bb1b8ae2 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -113,7 +113,7 @@ class User_Model extends CI_Model { // Add a user function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator, $timezone, $measurement, $user_date_format, $user_stylesheet, $user_sota_lookup, $user_show_notes, - $user_column1, $user_column2, $user_column3, $user_column4, $user_column5, $user_show_qrz_image) { + $user_column1, $user_column2, $user_column3, $user_column4, $user_column5, $user_show_profile_image) { // Check that the user isn't already used if(!$this->exists($username)) { $data = array( @@ -136,7 +136,7 @@ class User_Model extends CI_Model { 'user_column3' => xss_clean($user_column3), 'user_column4' => xss_clean($user_column4), 'user_column5' => xss_clean($user_column5), - 'user_show_qrz_image' => xss_clean($user_show_qrz_image), + 'user_show_profile_image' => xss_clean($user_show_profile_image), ); // Check the password is valid @@ -185,7 +185,7 @@ class User_Model extends CI_Model { 'user_column3' => xss_clean($fields['user_column3']), 'user_column4' => xss_clean($fields['user_column4']), 'user_column5' => xss_clean($fields['user_column5']), - 'user_show_qrz_image' => xss_clean($fields['user_show_qrz_image']), + 'user_show_profile_image' => xss_clean($fields['user_show_profile_image']), ); // Check to see if the user is allowed to change user levels @@ -295,7 +295,7 @@ class User_Model extends CI_Model { 'user_stylesheet' => $u->row()->user_stylesheet, 'user_sota_lookup' => isset($u->row()->user_sota_lookup) ? $u->row()->user_sota_lookup : 0, 'user_show_notes' => isset($u->row()->user_show_notes) ? $u->row()->user_show_notes : 1, - 'user_show_qrz_image' => isset($u->row()->user_show_qrz_image) ? $u->row()->user_show_qrz_image : 0, + 'user_show_profile_image' => isset($u->row()->user_show_profile_image) ? $u->row()->user_show_profile_image : 0, 'user_column1' => isset($u->row()->user_column1) ? $u->row()->user_column1: 'Mode', 'user_column2' => isset($u->row()->user_column2) ? $u->row()->user_column2: 'RSTS', 'user_column3' => isset($u->row()->user_column3) ? $u->row()->user_column3: 'RSTR', diff --git a/application/views/qso/index.php b/application/views/qso/index.php index c2019933..36275a1a 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -521,7 +521,7 @@
- session->userdata('user_show_qrz_image')) { ?> + session->userdata('user_show_profile_image')) { ?>