diff --git a/application/controllers/Accumulated.php b/application/controllers/Accumulated.php index 183329f73..f8616fb4b 100644 --- a/application/controllers/Accumulated.php +++ b/application/controllers/Accumulated.php @@ -10,7 +10,7 @@ class Accumulated extends CI_Controller $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Activators.php b/application/controllers/Activators.php index eb5667f6c..652833dc6 100644 --- a/application/controllers/Activators.php +++ b/application/controllers/Activators.php @@ -10,7 +10,7 @@ class Activators extends CI_Controller $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Activatorsmap.php b/application/controllers/Activatorsmap.php index 1399f4d0f..288527c7c 100644 --- a/application/controllers/Activatorsmap.php +++ b/application/controllers/Activatorsmap.php @@ -10,7 +10,7 @@ class Activatorsmap extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php index 4b83bc15e..7dd8af5f7 100644 --- a/application/controllers/Adif.php +++ b/application/controllers/Adif.php @@ -10,7 +10,7 @@ class adif extends CI_Controller { $this->load->helper(array('form', 'url')); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function test() { diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 823ff2777..405b8ccc9 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -13,7 +13,7 @@ class Awards extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Backup.php b/application/controllers/Backup.php index 44bf3bace..5c65e2028 100644 --- a/application/controllers/Backup.php +++ b/application/controllers/Backup.php @@ -10,7 +10,7 @@ class Backup extends CI_Controller { public function index() { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("Backup"); @@ -23,7 +23,7 @@ class Backup extends CI_Controller { public function adif($key = null){ if ($key == null) { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } $clean_key = $this->security->xss_clean($key); @@ -60,7 +60,7 @@ class Backup extends CI_Controller { public function notes($key = null) { if ($key == null) { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } $clean_key = $this->security->xss_clean($key); diff --git a/application/controllers/Band.php b/application/controllers/Band.php index 052114aab..121c10803 100644 --- a/application/controllers/Band.php +++ b/application/controllers/Band.php @@ -12,7 +12,7 @@ class Band extends CI_Controller { $this->load->helper(array('form', 'url')); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Bandmap.php b/application/controllers/Bandmap.php index 55c7fef4c..8145030ca 100644 --- a/application/controllers/Bandmap.php +++ b/application/controllers/Bandmap.php @@ -6,7 +6,7 @@ class Bandmap extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('bands'); } diff --git a/application/controllers/Cabrillo.php b/application/controllers/Cabrillo.php index a8b77cf88..062c079ee 100644 --- a/application/controllers/Cabrillo.php +++ b/application/controllers/Cabrillo.php @@ -13,7 +13,7 @@ class Cabrillo extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { @@ -50,7 +50,7 @@ class Cabrillo extends CI_Controller { header('Content-Type: application/json'); echo json_encode($result); } else { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } @@ -77,7 +77,7 @@ class Cabrillo extends CI_Controller { header('Content-Type: application/json'); echo json_encode($result); } else { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } @@ -132,7 +132,7 @@ class Cabrillo extends CI_Controller { $this->load->view('cabrillo/export', $data); }else { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } } diff --git a/application/controllers/Calltester.php b/application/controllers/Calltester.php index 84afaa8b3..f5baad08e 100644 --- a/application/controllers/Calltester.php +++ b/application/controllers/Calltester.php @@ -8,7 +8,7 @@ class Calltester extends CI_Controller { parent::__construct(); $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Cfdexport.php b/application/controllers/Cfdexport.php index 9e40c792d..4d15bff2b 100644 --- a/application/controllers/Cfdexport.php +++ b/application/controllers/Cfdexport.php @@ -15,7 +15,7 @@ class Cfdexport extends CI_Controller { $this->load->model('logbook_model'); $this->load->model('bands'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("CFD Export"); @@ -26,7 +26,7 @@ class Cfdexport extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('logbook_model'); $this->load->model('dxcc'); diff --git a/application/controllers/Components.php b/application/controllers/Components.php index 63d807188..283700e03 100644 --- a/application/controllers/Components.php +++ b/application/controllers/Components.php @@ -10,7 +10,7 @@ class Components extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Contestcalendar.php b/application/controllers/Contestcalendar.php index 421b42dab..a6e80a5e9 100644 --- a/application/controllers/Contestcalendar.php +++ b/application/controllers/Contestcalendar.php @@ -12,7 +12,7 @@ class Contestcalendar extends CI_Controller { public function index() { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index b0dac9839..7aef397c9 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -11,7 +11,7 @@ class Contesting extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Cron.php b/application/controllers/Cron.php index a122876c1..7e31fbb7e 100644 --- a/application/controllers/Cron.php +++ b/application/controllers/Cron.php @@ -23,7 +23,7 @@ class cron extends CI_Controller { $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -142,7 +142,7 @@ class cron extends CI_Controller { public function edit() { $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Csv.php b/application/controllers/Csv.php index 9b7c4b7dd..037de83cb 100644 --- a/application/controllers/Csv.php +++ b/application/controllers/Csv.php @@ -5,7 +5,7 @@ class Csv extends CI_Controller { public function index() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('modes'); $this->load->model('logbook_model'); @@ -28,7 +28,7 @@ class Csv extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('csv_model'); // Parameters diff --git a/application/controllers/Dayswithqso.php b/application/controllers/Dayswithqso.php index 9e1bb0862..c82567b55 100644 --- a/application/controllers/Dayswithqso.php +++ b/application/controllers/Dayswithqso.php @@ -8,7 +8,7 @@ class Dayswithqso extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index e9af0827a..c2c377e41 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -7,7 +7,7 @@ class Debug extends CI_Controller $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Distances.php b/application/controllers/Distances.php index f68287ca1..5c65831fa 100644 --- a/application/controllers/Distances.php +++ b/application/controllers/Distances.php @@ -8,7 +8,7 @@ class Distances extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Dxatlas.php b/application/controllers/Dxatlas.php index 48cbf81bf..dc10fa4f9 100644 --- a/application/controllers/Dxatlas.php +++ b/application/controllers/Dxatlas.php @@ -4,7 +4,7 @@ class Dxatlas extends CI_Controller { public function index() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('modes'); $this->load->model('logbook_model'); @@ -26,7 +26,7 @@ class Dxatlas extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('dxatlas_model'); @@ -48,7 +48,7 @@ class Dxatlas extends CI_Controller { function generateFiles($wkdArray, $cfmArray, $band) { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $gridCfmArray = []; $gridWkdArray = []; @@ -105,7 +105,7 @@ class Dxatlas extends CI_Controller { function makeZip($gridWkdString, $gridCfmString, $band) { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $zipFileName = 'dxatlas_gridsquares_'. $band . '.zip'; // Prepare File $file = tempnam(".", "zip"); diff --git a/application/controllers/Dxcalendar.php b/application/controllers/Dxcalendar.php index 9a4029702..a9281c925 100644 --- a/application/controllers/Dxcalendar.php +++ b/application/controllers/Dxcalendar.php @@ -5,7 +5,7 @@ class Dxcalendar extends CI_Controller { public function index() { $this->load->model('user_model'); $this->load->model('logbook_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("DX Calendar"); diff --git a/application/controllers/Dxcluster.php b/application/controllers/Dxcluster.php index 3a642256c..4414873f5 100644 --- a/application/controllers/Dxcluster.php +++ b/application/controllers/Dxcluster.php @@ -6,7 +6,7 @@ class Dxcluster extends CI_Controller { { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('dxcluster_model'); } diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index 6c70c9eee..6126a2a59 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -20,7 +20,7 @@ class eqsl extends CI_Controller { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -44,7 +44,7 @@ class eqsl extends CI_Controller { public function import() { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -141,7 +141,7 @@ class eqsl extends CI_Controller { public function export() { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -220,7 +220,7 @@ class eqsl extends CI_Controller { function generateResultTable($custom_date_format, $rows) { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -244,7 +244,7 @@ class eqsl extends CI_Controller { function writeEqslNotSent($qslsnotsent, $custom_date_format) { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $table = ''; @@ -283,7 +283,7 @@ class eqsl extends CI_Controller { function image($id) { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->library('electronicqsl'); @@ -345,7 +345,7 @@ class eqsl extends CI_Controller { function bulk_download_image($id) { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->library('electronicqsl'); @@ -408,7 +408,7 @@ class eqsl extends CI_Controller { // Check logged in $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -424,7 +424,7 @@ class eqsl extends CI_Controller { // Check logged in $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $errors = 0; @@ -484,7 +484,7 @@ class eqsl extends CI_Controller { // Check logged in $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Hamsat.php b/application/controllers/Hamsat.php index ae9516f99..4d25a4457 100644 --- a/application/controllers/Hamsat.php +++ b/application/controllers/Hamsat.php @@ -10,7 +10,7 @@ class Hamsat extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Kmlexport.php b/application/controllers/Kmlexport.php index 7ef266e35..dcc5772eb 100644 --- a/application/controllers/Kmlexport.php +++ b/application/controllers/Kmlexport.php @@ -15,7 +15,7 @@ class Kmlexport extends CI_Controller { $this->load->model('logbook_model'); $this->load->model('bands'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['worked_bands'] = $this->bands->get_worked_bands(); // Used in the view for band select $data['modes'] = $this->modes->active(); // Used in the view for mode select @@ -30,7 +30,7 @@ class Kmlexport extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } // Load Libraries if(!$this->load->is_loaded('Qra')) { $this->load->library('Qra'); diff --git a/application/controllers/Labels.php b/application/controllers/Labels.php index 42f75fe7f..53ce1a0df 100644 --- a/application/controllers/Labels.php +++ b/application/controllers/Labels.php @@ -23,7 +23,7 @@ class Labels extends CI_Controller { $this->load->helper(array('form', 'url', 'psr4_autoloader')); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index f7d5d6b02..fa3976e05 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -13,7 +13,7 @@ class Logbookadvanced extends CI_Controller { $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Lookup.php b/application/controllers/Lookup.php index a56437e13..88fe726eb 100644 --- a/application/controllers/Lookup.php +++ b/application/controllers/Lookup.php @@ -14,7 +14,7 @@ class Lookup extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 3c4412e23..d5b90ed03 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -42,7 +42,7 @@ class Lotw extends CI_Controller { public function index() { $this->load->library('Permissions'); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } // Load required models for page generation $this->load->model('Lotw_model'); @@ -74,7 +74,7 @@ class Lotw extends CI_Controller { public function cert_upload() { $this->load->model('user_model'); $this->load->model('dxcc'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } // Load DXCC Countrys List $data['dxcc_list'] = $this->dxcc->list(); @@ -101,7 +101,7 @@ class Lotw extends CI_Controller { { $this->load->model('user_model'); $this->load->model('dxcc'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } // create folder to store certs while processing if (!file_exists('./uploads/lotw/certs')) { @@ -375,7 +375,7 @@ class Lotw extends CI_Controller { */ public function delete_cert($cert_id) { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('Lotw_model'); @@ -398,7 +398,7 @@ class Lotw extends CI_Controller { */ public function decrypt_key($file, $password = "") { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $results = array(); $password = $password; // Only needed if 12 has a password set @@ -709,7 +709,7 @@ class Lotw extends CI_Controller { public function import() { // Is only called via frontend. Cron uses "upload". within download the download is called $this->load->model('user_model'); if(!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); exit(); } @@ -817,7 +817,7 @@ class Lotw extends CI_Controller { } } } else { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); exit(); } @@ -825,7 +825,7 @@ class Lotw extends CI_Controller { public function export() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("LoTW .TQ8 Upload"); diff --git a/application/controllers/Mode.php b/application/controllers/Mode.php index d0f61c120..865243d84 100644 --- a/application/controllers/Mode.php +++ b/application/controllers/Mode.php @@ -12,7 +12,7 @@ class Mode extends CI_Controller { $this->load->helper(array('form', 'url')); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Notes.php b/application/controllers/Notes.php index b411a3fc9..ba27c2a00 100644 --- a/application/controllers/Notes.php +++ b/application/controllers/Notes.php @@ -7,7 +7,7 @@ class Notes extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Options.php b/application/controllers/Options.php index 9a3f5469a..821997281 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -12,7 +12,7 @@ class Options extends CI_Controller { $this->load->helper(array('form', 'url')); $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Oqrs.php b/application/controllers/Oqrs.php index 52ba6d31a..5e723d484 100644 --- a/application/controllers/Oqrs.php +++ b/application/controllers/Oqrs.php @@ -11,8 +11,8 @@ class Oqrs extends CI_Controller { parent::__construct(); // Commented out to get public access // $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'); } - if (($this->config->item('disable_oqrs') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + // if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } + if (($this->config->item('disable_oqrs') ?? false)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Qrbcalc.php b/application/controllers/Qrbcalc.php index 7ac4499cc..2056ae154 100644 --- a/application/controllers/Qrbcalc.php +++ b/application/controllers/Qrbcalc.php @@ -10,7 +10,7 @@ class Qrbcalc extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index 94d5500a5..965489808 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -248,7 +248,7 @@ class Qrz extends CI_Controller { public function import_qrz() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("QRZ QSL Import"); diff --git a/application/controllers/Qsl.php b/application/controllers/Qsl.php index 68aff8681..59177e8ad 100644 --- a/application/controllers/Qsl.php +++ b/application/controllers/Qsl.php @@ -9,8 +9,8 @@ class Qsl extends CI_Controller { 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'); } - if(($this->config->item('disable_qsl') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); exit; } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } + if(($this->config->item('disable_qsl') ?? false)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); exit; } } // Default view when loading controller. @@ -41,7 +41,7 @@ class Qsl extends CI_Controller { // Deletes QSL Card public function delete() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $id = $this->input->post('id'); $this->load->model('Qsl_model'); $this->Qsl_model->deleteQsl($id); @@ -49,7 +49,7 @@ class Qsl extends CI_Controller { public function uploadqsl() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $qsoid = $this->input->post('qsoid'); diff --git a/application/controllers/Qslprint.php b/application/controllers/Qslprint.php index 81392bef3..1491e160e 100644 --- a/application/controllers/Qslprint.php +++ b/application/controllers/Qslprint.php @@ -144,7 +144,7 @@ class QSLPrint extends CI_Controller { $this->load->model('qslprint_model'); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } // Update Logbook to Mark Paper Card Sent diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index 23821f9d3..028a89527 100644 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -6,7 +6,7 @@ class QSO extends CI_Controller { { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { @@ -16,7 +16,7 @@ class QSO extends CI_Controller { $this->load->model('user_model'); $this->load->model('modes'); $this->load->model('bands'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } // Getting the live/post mode from GET command // 0 = live @@ -173,7 +173,7 @@ class QSO extends CI_Controller { $this->load->model('logbook_model'); $this->load->model('user_model'); $this->load->model('modes'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $query = $this->logbook_model->qso_info($this->uri->segment(3)); $this->load->library('form_validation'); @@ -276,7 +276,7 @@ class QSO extends CI_Controller { $this->load->library('form_validation'); if(!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $id = str_replace('"', "", $this->input->post("id", TRUE)); @@ -296,7 +296,7 @@ class QSO extends CI_Controller { $this->load->model('logbook_model'); $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'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->logbook_model->edit(); @@ -305,7 +305,7 @@ class QSO extends CI_Controller { function qsl_rcvd($id, $method) { $this->load->model('logbook_model'); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } // Update Logbook to Mark Paper Card Received @@ -600,7 +600,7 @@ class QSO extends CI_Controller { // Return Previous QSOs Made in the active logbook public function component_past_contacts() { - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('logbook_model'); session_write_close(); diff --git a/application/controllers/Radio.php b/application/controllers/Radio.php index 577cded5a..1d9af0cfd 100644 --- a/application/controllers/Radio.php +++ b/application/controllers/Radio.php @@ -256,7 +256,7 @@ class Radio extends CI_Controller { // Check Auth $this->load->model('user_model'); if (!$this->user_model->authorize(3)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -282,7 +282,7 @@ class Radio extends CI_Controller { // Check Auth $this->load->model('user_model'); if (!$this->user_model->authorize(3)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -298,7 +298,7 @@ class Radio extends CI_Controller { // Check Auth $this->load->model('user_model'); if (!$this->user_model->authorize(3)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/Satellite.php b/application/controllers/Satellite.php index d35ef170a..04860825b 100644 --- a/application/controllers/Satellite.php +++ b/application/controllers/Satellite.php @@ -12,7 +12,7 @@ class Satellite extends CI_Controller { $this->load->helper(array('form', 'url')); $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Sattimers.php b/application/controllers/Sattimers.php index dcd1a6127..053c26e3b 100644 --- a/application/controllers/Sattimers.php +++ b/application/controllers/Sattimers.php @@ -6,7 +6,7 @@ class Sattimers extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Search.php b/application/controllers/Search.php index 51c4aeef5..614bd6ae2 100644 --- a/application/controllers/Search.php +++ b/application/controllers/Search.php @@ -10,7 +10,7 @@ class Search extends CI_Controller { $this->load->helper(array('form', 'url')); if($this->optionslib->get_option('global_search') != "true") { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } } diff --git a/application/controllers/Simplefle.php b/application/controllers/Simplefle.php index d0859fcd7..b090e9afa 100644 --- a/application/controllers/Simplefle.php +++ b/application/controllers/Simplefle.php @@ -4,7 +4,7 @@ class SimpleFLE extends CI_Controller { public function index() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $this->load->model('stations'); diff --git a/application/controllers/Station.php b/application/controllers/Station.php index 7cc014b62..6ac978521 100644 --- a/application/controllers/Station.php +++ b/application/controllers/Station.php @@ -14,7 +14,7 @@ class Station extends CI_Controller $this->load->model('user_model'); if (!$this->user_model->authorize(2)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } diff --git a/application/controllers/Stationsetup.php b/application/controllers/Stationsetup.php index 40ef64be3..1c4afd6b0 100644 --- a/application/controllers/Stationsetup.php +++ b/application/controllers/Stationsetup.php @@ -12,7 +12,7 @@ class Stationsetup extends CI_Controller { $this->load->helper(array('form', 'url')); $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() { diff --git a/application/controllers/Themes.php b/application/controllers/Themes.php index ba032823a..6b52aa4e7 100644 --- a/application/controllers/Themes.php +++ b/application/controllers/Themes.php @@ -14,7 +14,7 @@ class Themes extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Timeline.php b/application/controllers/Timeline.php index 24e2b78f7..d0acdbe5e 100644 --- a/application/controllers/Timeline.php +++ b/application/controllers/Timeline.php @@ -8,7 +8,7 @@ class Timeline extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Timeplotter.php b/application/controllers/Timeplotter.php index 9a74eb55d..da550db18 100644 --- a/application/controllers/Timeplotter.php +++ b/application/controllers/Timeplotter.php @@ -8,7 +8,7 @@ class Timeplotter extends CI_Controller { 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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function index() diff --git a/application/controllers/Update.php b/application/controllers/Update.php index 8c1ba2ca9..20aa07ce9 100644 --- a/application/controllers/Update.php +++ b/application/controllers/Update.php @@ -21,7 +21,7 @@ class Update extends CI_Controller { public function index() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['page_title'] = __("Updates"); $this->load->view('interface_assets/header', $data); @@ -270,7 +270,7 @@ class Update extends CI_Controller { public function check_missing_dxcc($all = false){ $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -281,7 +281,7 @@ class Update extends CI_Controller { public function check_missing_continent() { $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -292,7 +292,7 @@ class Update extends CI_Controller { public function update_distances() { $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } @@ -303,7 +303,7 @@ class Update extends CI_Controller { public function check_missing_grid($all = false){ $this->load->model('user_model'); if (!$this->user_model->authorize(99)) { - $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); + $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } diff --git a/application/controllers/User.php b/application/controllers/User.php index 3d355b8b4..3cb9e4de2 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -5,7 +5,7 @@ class User extends CI_Controller { public function index() { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['results'] = $this->user_model->users(); @@ -18,7 +18,7 @@ class User extends CI_Controller { function add() { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $data['existing_languages'] = $this->config->item('languages'); @@ -203,8 +203,8 @@ class User extends CI_Controller { function edit() { $this->load->model('user_model'); - if ( ($this->session->userdata('user_id') == '') || ((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) ) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - if ( $this->config->item('special_callsign') && $this->session->userdata('user_type') != '99' && $this->config->item('sc_hide_usermenu') ) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if ( ($this->session->userdata('user_id') == '') || ((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) ) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } + if ( $this->config->item('special_callsign') && $this->session->userdata('user_type') != '99' && $this->config->item('sc_hide_usermenu') ) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $query = $this->user_model->get_by_id($this->uri->segment(3)); $data['existing_languages'] = $this->config->item('languages'); @@ -716,7 +716,7 @@ class User extends CI_Controller { function profile() { $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'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $query = $this->user_model->get_by_id($this->session->userdata('user_id')); $q = $query->row(); $data['page_title'] = __("Profile"); @@ -735,7 +735,7 @@ class User extends CI_Controller { function delete() { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $query = $this->user_model->get_by_id($this->uri->segment(3)); $this->load->library('form_validation'); @@ -1018,7 +1018,7 @@ class User extends CI_Controller { $this->load->model('user_model'); - if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } $query = $this->user_model->get_by_id($this->input->post('user_id')); diff --git a/application/controllers/User_options.php b/application/controllers/User_options.php index a74cfcec5..3312ea4b5 100644 --- a/application/controllers/User_options.php +++ b/application/controllers/User_options.php @@ -6,7 +6,7 @@ class User_Options extends CI_Controller { parent::__construct(); $this->load->model('user_model'); $this->load->model('user_options_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } } public function add_edit_fav() { diff --git a/application/migrations/215_impersonators.php b/application/migrations/215_impersonators.php new file mode 100644 index 000000000..f97269920 --- /dev/null +++ b/application/migrations/215_impersonators.php @@ -0,0 +1,51 @@ +db->table_exists('impersonators')) { + + $this->dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => 6, + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + 'null' => FALSE + ), + 'user_id' => array( + 'type' => 'BIGINT', + 'constraint' => 20, + 'unsigned' => TRUE, + 'auto_increment' => FALSE, + 'null' => FALSE + ), + 'impersonate_id' => array( + 'type' => 'BIGINT', + 'constraint' => 20, + 'unsigned' => TRUE, + 'auto_increment' => FALSE, + 'null' => FALSE + ) + )); + + $this->dbforge->add_key('id', TRUE); + + $this->dbforge->create_table('impersonators'); + + } + } + + public function down() { + + $this->dbforge->drop_table('impersonators'); + + } + +}