From 7737be560c24905e713ca7ecbf97d7209af0982e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVeLiTi=E2=80=9D?= <“info@veliti.nl”> Date: Thu, 3 Oct 2024 16:01:14 +0200 Subject: [PATCH] CMXX - Bugfixes --- assets/functions.php | 2 +- profiles.php | 12 +++++------- settings/settingsprofiles.php | 12 ++++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/assets/functions.php b/assets/functions.php index de5d765..bb9da50 100644 --- a/assets/functions.php +++ b/assets/functions.php @@ -608,7 +608,7 @@ function getProfile($profile, $permission){ else { switch ($permission) { case '4': //Admin++ - $profile = admin_profile; + $profile = adminplus_profile; break; case '3': //Admin $profile = admin_profile; diff --git a/profiles.php b/profiles.php index 782021c..d4e13fb 100644 --- a/profiles.php +++ b/profiles.php @@ -1,18 +1,16 @@ '; + $form = '
Each tab represents a profile. Each element in a profile represents a view and or API access.'; for ($i = 0; $i < count($rows); $i++) { preg_match('/\/\*(.*?)\*\//', $rows[$i], $match); if ($match) { @@ -93,7 +91,7 @@ if (isset($_POST['submit']) && !empty($_POST)) { foreach($profile_views as $profile_view){ $view_input .= $profile_view.','; } - $view_input = substr($view_input,0,-1); + $view_input = "'".substr($view_input,0,-1)."'"; // Update the configuration file with the new keys and values $contents = preg_replace('/define\(\'' . $profile_name . '\'\, ?(.*?)\)/s', 'define(\'' . $profile_name . '\',' . $view_input . ')', $contents); diff --git a/settings/settingsprofiles.php b/settings/settingsprofiles.php index c8122fc..811a1bd 100644 --- a/settings/settingsprofiles.php +++ b/settings/settingsprofiles.php @@ -1,16 +1,16 @@