diff --git a/application/controllers/Admins.php b/application/controllers/Admins.php index e39949ef..4c067280 100644 --- a/application/controllers/Admins.php +++ b/application/controllers/Admins.php @@ -45,7 +45,7 @@ class Admins extends EA_Controller { if (cannot('view', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $user_id = session('user_id'); @@ -104,7 +104,7 @@ class Admins extends EA_Controller { if (cannot('add', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $admin_id = $this->admins_model->save($admin); @@ -131,7 +131,7 @@ class Admins extends EA_Controller { if (cannot('edit', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $admin_id = $this->admins_model->save($admin); @@ -156,7 +156,7 @@ class Admins extends EA_Controller { { if (cannot('delete', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $admin_id = request('admin_id'); @@ -182,7 +182,7 @@ class Admins extends EA_Controller { { if (cannot('view', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $admin_id = request('admin_id'); diff --git a/application/controllers/Appointments.php b/application/controllers/Appointments.php index 7292fe6a..4de40322 100644 --- a/application/controllers/Appointments.php +++ b/application/controllers/Appointments.php @@ -57,7 +57,7 @@ class Appointments extends EA_Controller { { if (cannot('view', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $keyword = request('keyword', ''); @@ -89,7 +89,7 @@ class Appointments extends EA_Controller { if (cannot('add', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $appointment_id = $this->appointments_model->save($appointment); @@ -116,7 +116,7 @@ class Appointments extends EA_Controller { if (cannot('edit', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $appointment_id = $this->appointments_model->save($appointment); @@ -141,7 +141,7 @@ class Appointments extends EA_Controller { { if (cannot('delete', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $appointment_id = request('appointment_id'); @@ -167,7 +167,7 @@ class Appointments extends EA_Controller { { if (cannot('view', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $appointment_id = request('appointment_id'); diff --git a/application/controllers/Legal_settings.php b/application/controllers/Legal_settings.php index 84037c33..214e3c5b 100644 --- a/application/controllers/Legal_settings.php +++ b/application/controllers/Legal_settings.php @@ -54,7 +54,7 @@ class Legal_settings extends EA_Controller { if (cannot('view', PRIV_SYSTEM_SETTINGS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $user_id = session('user_id'); diff --git a/application/controllers/Secretaries.php b/application/controllers/Secretaries.php index 20f28620..9b68fd6d 100644 --- a/application/controllers/Secretaries.php +++ b/application/controllers/Secretaries.php @@ -46,7 +46,7 @@ class Secretaries extends EA_Controller { if (cannot('view', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $user_id = session('user_id'); @@ -74,7 +74,7 @@ class Secretaries extends EA_Controller { { if (cannot('view', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $keyword = request('keyword', ''); @@ -106,7 +106,7 @@ class Secretaries extends EA_Controller { if (cannot('add', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $secretary_id = $this->secretaries_model->save($secretary); @@ -133,7 +133,7 @@ class Secretaries extends EA_Controller { if (cannot('edit', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $secretary_id = $this->secretaries_model->save($secretary); @@ -158,7 +158,7 @@ class Secretaries extends EA_Controller { { if (cannot('delete', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $secretary_id = request('secretary_id'); @@ -184,7 +184,7 @@ class Secretaries extends EA_Controller { { if (cannot('view', PRIV_USERS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $secretary_id = request('secretary_id'); diff --git a/application/controllers/Unavailabilities.php b/application/controllers/Unavailabilities.php index 3f874610..c6fb3ae0 100644 --- a/application/controllers/Unavailabilities.php +++ b/application/controllers/Unavailabilities.php @@ -42,7 +42,7 @@ class Unavailabilities extends EA_Controller { { if (cannot('view', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $keyword = request('keyword', ''); @@ -74,7 +74,7 @@ class Unavailabilities extends EA_Controller { if (cannot('add', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $unavailability_id = $this->unavailabilities_model->save($unavailability); @@ -101,7 +101,7 @@ class Unavailabilities extends EA_Controller { if (cannot('edit', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $unavailability_id = $this->unavailabilities_model->save($unavailability); @@ -126,7 +126,7 @@ class Unavailabilities extends EA_Controller { { if (cannot('delete', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $unavailability_id = request('unavailability_id'); @@ -152,7 +152,7 @@ class Unavailabilities extends EA_Controller { { if (cannot('view', PRIV_APPOINTMENTS)) { - show_error('Forbidden', 403); + abort(403, 'Forbidden'); } $unavailability_id = request('unavailability_id');