From f0bc1cfe33e905fccf6f1f981292c0d4464f8e51 Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Fri, 6 Dec 2024 11:55:41 -0700 Subject: [PATCH] Update contacts path (#7192) * Update contacts path * Update menu.php * Update contact_edit.php * Update contact_relation_edit.php * Update config.php * Update authentication.php * Update database.php * Update totp.php * Update email.php --- core/authentication/resources/classes/authentication.php | 2 +- .../authentication/resources/classes/plugins/database.php | 2 +- core/authentication/resources/classes/plugins/email.php | 4 ++-- core/authentication/resources/classes/plugins/totp.php | 4 ++-- core/contacts/contact_auth.php | 4 ++-- core/contacts/contact_edit.php | 4 ++-- core/contacts/contact_relation_edit.php | 4 ++-- core/contacts/resources/dashboard/config.php | 2 +- resources/classes/menu.php | 8 ++++---- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/authentication/resources/classes/authentication.php b/core/authentication/resources/classes/authentication.php index 5355451606..790f319709 100644 --- a/core/authentication/resources/classes/authentication.php +++ b/core/authentication/resources/classes/authentication.php @@ -79,7 +79,7 @@ class authentication { } //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //use the authentication plugins foreach ($_SESSION['authentication']['methods'] as $name) { diff --git a/core/authentication/resources/classes/plugins/database.php b/core/authentication/resources/classes/plugins/database.php index bebcd73892..9d61f26379 100644 --- a/core/authentication/resources/classes/plugins/database.php +++ b/core/authentication/resources/classes/plugins/database.php @@ -171,7 +171,7 @@ class plugin_database { $user_authorized = false; //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //check the username and password if they don't match then redirect to the login $sql = "select "; diff --git a/core/authentication/resources/classes/plugins/email.php b/core/authentication/resources/classes/plugins/email.php index 7db1f98da8..900c467b36 100644 --- a/core/authentication/resources/classes/plugins/email.php +++ b/core/authentication/resources/classes/plugins/email.php @@ -404,7 +404,7 @@ class plugin_email { unset($_POST['authentication_code']); //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //get the user details if ($auth_valid) { @@ -522,4 +522,4 @@ class plugin_email { } } -?> \ No newline at end of file +?> diff --git a/core/authentication/resources/classes/plugins/totp.php b/core/authentication/resources/classes/plugins/totp.php index 1f7af49e43..0524335a63 100644 --- a/core/authentication/resources/classes/plugins/totp.php +++ b/core/authentication/resources/classes/plugins/totp.php @@ -328,7 +328,7 @@ class plugin_totp { unset($_POST['authentication_code']); //check if contacts app exists - $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/contacts/') ? true : false; + $contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/contacts/') ? true : false; //get the user details if ($auth_valid) { @@ -440,4 +440,4 @@ class plugin_totp { } } -?> \ No newline at end of file +?> diff --git a/core/contacts/contact_auth.php b/core/contacts/contact_auth.php index b5c9335960..e43356017f 100644 --- a/core/contacts/contact_auth.php +++ b/core/contacts/contact_auth.php @@ -61,7 +61,7 @@ if ($_SESSION['contact_auth']['source'] == 'google') { if (isset($_REQUEST['signout'])) { unset($_SESSION['contact_auth']['token']); message::add($text['message-google_signed_out']); - header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/app/contacts/".$_SESSION['contact_auth']['referer']); + header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/core/contacts/".$_SESSION['contact_auth']['referer']); exit; } @@ -117,4 +117,4 @@ else { exit; } -?> \ No newline at end of file +?> diff --git a/core/contacts/contact_edit.php b/core/contacts/contact_edit.php index fe01c2eaeb..d8d1767eab 100644 --- a/core/contacts/contact_edit.php +++ b/core/contacts/contact_edit.php @@ -963,10 +963,10 @@ } }; if (search) { - xhttp.open("GET", "/app/contacts/contact_json.php?search="+search, true); + xhttp.open("GET", "/core/contacts/contact_json.php?search="+search, true); } else { - xhttp.open("GET", "/app/contacts/contact_json.php", true); + xhttp.open("GET", "/core/contacts/contact_json.php", true); } xhttp.send(); } diff --git a/core/contacts/contact_relation_edit.php b/core/contacts/contact_relation_edit.php index 66436d4150..f223e084e5 100644 --- a/core/contacts/contact_relation_edit.php +++ b/core/contacts/contact_relation_edit.php @@ -241,10 +241,10 @@ } }; if (search) { - xhttp.open("GET", "/app/contacts/contact_json.php?search="+search, true); + xhttp.open("GET", "/core/contacts/contact_json.php?search="+search, true); } else { - xhttp.open("GET", "/app/contacts/contact_json.php", true); + xhttp.open("GET", "/core/contacts/contact_json.php", true); } xhttp.send(); } diff --git a/core/contacts/resources/dashboard/config.php b/core/contacts/resources/dashboard/config.php index 09f7ca8b64..4f076d885c 100644 --- a/core/contacts/resources/dashboard/config.php +++ b/core/contacts/resources/dashboard/config.php @@ -5,7 +5,7 @@ $array['dashboard'][$x]['dashboard_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2f $array['dashboard'][$x]['dashboard_name'] = 'Contacts'; $array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-regular fa-address-card'; -$array['dashboard'][$x]['dashboard_url'] = '/app/contacts/contacts.php'; +$array['dashboard'][$x]['dashboard_url'] = '/core/contacts/contacts.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard'][$x]['dashboard_height'] = ''; diff --git a/resources/classes/menu.php b/resources/classes/menu.php index 6c00fa7aa8..9476a69142 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -1082,7 +1082,7 @@ if (!class_exists('menu')) { $user_graphic = ""; //overwrite user graphic with image from session, if exists if ($this->settings->get('theme', 'body_header_user_image', true) == true && !empty($_SESSION['user']['contact_image']) && is_uuid($_SESSION['user']['contact_image'])) { - $user_graphic = ""; + $user_graphic = ""; } $html .= "