mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-01 04:12:22 +03:00
Replaced the "show_error" with the "abort" equivalent
This commit is contained in:
parent
0ff19b050d
commit
526df6e4d7
5 changed files with 22 additions and 22 deletions
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue