diff --git a/src/application/controllers/backend_api.php b/src/application/controllers/backend_api.php index 2b1f4552..44361d07 100644 --- a/src/application/controllers/backend_api.php +++ b/src/application/controllers/backend_api.php @@ -196,7 +196,7 @@ class Backend_api extends CI_Controller { $provider_title = 'Appointment details have changed.'; $provider_message = ''; - $provider_link = $this->config->item('base_url') . 'backend/' + $provider_link = $this->config->item('base_url') . 'backend/index/' . $appointment['hash']; } @@ -332,14 +332,15 @@ class Backend_api extends CI_Controller { */ public function ajax_disable_provider_sync() { try { - if ($this->privileges[PRIV_USERS]['edit'] == FALSE) { - throw new Exception('You do not have the required privileges for this task.'); - } - if (!isset($_POST['provider_id'])) { throw new Exception('Provider id not specified.'); } + if ($this->privileges[PRIV_USERS]['edit'] == FALSE + && $this->session->userdata('user_id') != $_POST['provider_id']) { + throw new Exception('You do not have the required privileges for this task.'); + } + $this->load->model('providers_model'); $this->providers_model->set_setting('google_sync', FALSE, $_POST['provider_id']); $this->providers_model->set_setting('google_token', NULL, $_POST['provider_id']); diff --git a/src/application/views/appointments/book.php b/src/application/views/appointments/book.php index 86a11639..a0d38ad6 100644 --- a/src/application/views/appointments/book.php +++ b/src/application/views/appointments/book.php @@ -200,16 +200,18 @@ } } - foreach($grouped_services as $group) { - $group_label = ($group[0]['category_name'] != NULL) - ? $group[0]['category_name'] : 'Uncategorized'; - - echo ''; } } else { foreach($available_services as $service) { diff --git a/src/application/views/appointments/book_success.php b/src/application/views/appointments/book_success.php index e6df0eba..30d3492f 100644 --- a/src/application/views/appointments/book_success.php +++ b/src/application/views/appointments/book_success.php @@ -146,7 +146,7 @@ '