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
This commit is contained in:
parent
014adb461b
commit
f0bc1cfe33
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 ";
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'] = '';
|
||||
|
|
|
|||
|
|
@ -1082,7 +1082,7 @@ if (!class_exists('menu')) {
|
|||
$user_graphic = "<i class='".$this->settings->get('theme', 'body_header_icon_user', 'fa-solid fa-user-circle')."'></i>";
|
||||
//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 = "<span style=\"display: inline-block; vertical-align: middle; width: 15px; height: 15px; border-radius: 50%; margin-top: -2px; background-image: url('".PROJECT_PATH."/app/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></span>";
|
||||
$user_graphic = "<span style=\"display: inline-block; vertical-align: middle; width: 15px; height: 15px; border-radius: 50%; margin-top: -2px; background-image: url('".PROJECT_PATH."/core/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></span>";
|
||||
}
|
||||
$html .= " <li class='nav-item'>\n";
|
||||
$html .= " <a class='nav-link header_user d-block d-sm-none' href='show:usermenu' title=\"".$_SESSION['username']."\" style='border-top: 1px solid ".($this->settings->get('theme', 'menu_sub_background_color') ?? 'rgba(0,0,0,0.90)')."' data-toggle='collapse' data-target='#main_navbar' onclick=\"event.preventDefault(); $('#body_header_user_menu').toggleFadeSlide();\">".($user_graphic ?? null)."<span style='margin-left: 7px;'>".escape($_SESSION['username'])."</span></a>";
|
||||
|
|
@ -1126,7 +1126,7 @@ if (!class_exists('menu')) {
|
|||
$html .= "<div id='body_header_user_menu'>\n";
|
||||
$html .= " <div class='row m-0'>\n";
|
||||
if (!empty($_SESSION['user']['contact_image']) && is_uuid($_SESSION['user']['contact_image'])) {
|
||||
$html .= " <div class='col-5 col-sm-6 p-0' style=\"min-width: 130px; background-image: url('".PROJECT_PATH."/app/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></div>\n";
|
||||
$html .= " <div class='col-5 col-sm-6 p-0' style=\"min-width: 130px; background-image: url('".PROJECT_PATH."/core/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></div>\n";
|
||||
}
|
||||
else {
|
||||
$html .= " <div class='col-5 col-sm-6 p-0 pt-1' style=\"min-width: 130px; cursor: help;\" title=\"".$this->text['label-primary-contact-attachment-image']."\"><i class='fa-solid fa-user-circle fa-8x' style='opacity: 0.1;'></i></div>\n";
|
||||
|
|
@ -1259,7 +1259,7 @@ if (!class_exists('menu')) {
|
|||
$html .= "<div id='body_header_user_menu'>\n";
|
||||
$html .= " <div class='row m-0'>\n";
|
||||
if (!empty($_SESSION['user']['contact_image']) && is_uuid($_SESSION['user']['contact_image'])) {
|
||||
$html .= " <div class='col-5 col-sm-6 p-0' style=\"min-width: 130px; background-image: url('".PROJECT_PATH."/app/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></div>\n";
|
||||
$html .= " <div class='col-5 col-sm-6 p-0' style=\"min-width: 130px; background-image: url('".PROJECT_PATH."/core/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></div>\n";
|
||||
}
|
||||
else {
|
||||
$html .= " <div class='col-5 col-sm-6 p-0 pt-1' style=\"min-width: 130px; cursor: help;\" title=\"".$this->text['label-primary-contact-attachment-image']."\"><i class='fa-solid fa-user-circle fa-8x' style='opacity: 0.1;'></i></div>\n";
|
||||
|
|
@ -1308,7 +1308,7 @@ if (!class_exists('menu')) {
|
|||
//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_size = str_replace(['px','%'], '', intval($this->settings->get('theme', 'body_header_user_image_size', 18)));
|
||||
$user_graphic = "<span style=\"display: inline-block; vertical-align: middle; width: ".$user_graphic_size."px; height: ".$user_graphic_size."px; border-radius: 50%; margin-right: 7px; margin-top: ".($user_graphic_size > 18 ? '-'.(ceil(($user_graphic_size - 18) / 2) - 4) : '-4')."px; background-image: url('".PROJECT_PATH."/app/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></span>";
|
||||
$user_graphic = "<span style=\"display: inline-block; vertical-align: middle; width: ".$user_graphic_size."px; height: ".$user_graphic_size."px; border-radius: 50%; margin-right: 7px; margin-top: ".($user_graphic_size > 18 ? '-'.(ceil(($user_graphic_size - 18) / 2) - 4) : '-4')."px; background-image: url('".PROJECT_PATH."/core/contacts/contact_attachment.php?id=".$_SESSION['user']['contact_image']."&action=download&sid=".session_id()."'); background-repeat: no-repeat; background-size: cover; background-position: center;\"></span>";
|
||||
}
|
||||
$html .= "<span style='display: inline-block; padding-right: 20px; font-size: 90%;'>\n";
|
||||
$html .= " <a href='show:usermenu' title=\"".$_SESSION['username']."\" onclick=\"event.preventDefault(); $('#body_header_user_menu').toggleFadeSlide();\">".($user_graphic ?? null)."<span class='d-none d-sm-inline'>".escape($_SESSION['username'])."</span></a>";
|
||||
|
|
|
|||
Loading…
Reference in New Issue