contacts php 8.1 changes (#6730)

* Update contacts_vcard.php

* Update vcard.php

* Update contact_edit.php

* Update contact_view.php

* Update contact_phone_edit.php

* Update contact_address_edit.php

* Update contact_addresses.php

* Update contact_addresses_view.php

* Update contact_attachment.php

* Update contact_attachment_edit.php

* Update contact_attachments.php

* Update contact_attachments_view.php

* Update contact_email_edit.php

* Update contact_emails.php

* Update contact_emails_view.php

* Update contact_extensions.php

* Update contact_extensions_view.php

* Update contact_import.php

* Update contact_import_google.php

* Update contact_json.php

* Update contact_note_edit.php

* Update contact_notes.php

* Update contact_notes_view.php

* Update contact_phones.php

* Update contact_phones_view.php

* Update contact_relation_edit.php

* Update contact_emails_view.php

* Update contact_addresses_view.php

* Update contact_relations.php

* Update contact_relations_view.php

* Update contact_setting_edit.php

* Update contact_settings.php

* Update contact_time_edit.php

* Update contact_timer.php

* Update contact_timer_inc.php

* Update contact_times.php

* Update contact_url_edit.php

* Update contact_urls.php

* Update contact_urls_view.php

* Update contact_import.php

* Update contact_import.php

* Update contact_email_edit.php

* Update contact_url_edit.php

* Update contact_relation_edit.php

* Update contact_note_edit.php

* Update contact_setting_edit.php

* Update contact_attachment_edit.php

* Update contact_edit.php

* Update contact_phones_view.php

* Update contact_note_edit.php

* Update contact_attachment_edit.php

* Update contact_phones_view.php

* Update contact_edit.php

* Update contacts.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_phone_edit.php

* Update contact_addresses.php

* Update contact_addresses_view.php

* Update contact_attachment_edit.php

* Update contact_attachments.php

* Update contact_attachments_view.php

* Update contact_edit.php

* Update contact_email_edit.php

* Update contact_emails.php

* Update contact_emails_view.php

* Update contact_extensions.php

* Update contact_extensions_view.php

* Update contact_import.php

* Update contact_import_google.php

* Update contact_json.php

* Update contact_note_edit.php

* Update contact_notes.php

* Update contact_notes_view.php

* Update contact_phone_edit.php

* Update contact_phones.php

* Update contact_phones_view.php

* Update contact_relations.php

* Update contact_relations_view.php

* Update contact_setting_edit.php

* Update contact_settings.php

* Update contact_time_edit.php

* Update contact_timer.php

* Update contact_timer_inc.php

* Update contact_times.php

* Update contact_url_edit.php

* Update contact_urls.php

* Update contact_urls_view.php

* Update contact_view.php

* Update contacts.php

* Update contacts_vcard.php
This commit is contained in:
Alex
2023-06-01 11:50:12 -06:00
committed by GitHub
parent 7b25e81a8d
commit 9df57e679d
38 changed files with 565 additions and 472 deletions
+12 -12
View File
@@ -46,7 +46,7 @@
$text = $language->get();
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$contact_note_uuid = $_REQUEST["id"];
}
@@ -55,19 +55,19 @@
}
//get the primary id for the contact
if (is_uuid($_GET["contact_uuid"])) {
if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
$contact_uuid = $_GET["contact_uuid"];
}
//get http post variables and set them to php variables
if (count($_POST)>0) {
if (!empty($_POST)) {
$contact_note = $_POST["contact_note"];
$last_mod_date = $_POST["last_mod_date"];
$last_mod_user = $_POST["last_mod_user"];
$last_mod_user = $_POST["last_mod_user"] ?? '';
}
//process the form data
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//get the primary id for the contact note
if ($action == "update") {
@@ -98,7 +98,7 @@
}
//add or update the database
if ($_POST["persistformvar"] != "true") {
if (empty($_POST["persistformvar"])) {
//update last modified
$array['contacts'][0]['contact_uuid'] = $contact_uuid;
@@ -133,7 +133,7 @@
}
//execute
if (is_array($array) && @sizeof($array) != 0) {
if (!empty($array)) {
$array['contact_notes'][0]['contact_uuid'] = $contact_uuid;
$array['contact_notes'][0]['domain_uuid'] = $domain_uuid;
$array['contact_notes'][0]['contact_note'] = $contact_note;
@@ -155,8 +155,8 @@
}
//pre-populate the form
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
$contact_note_uuid = $_GET["id"];
if (!empty($_GET) && empty($_POST["persistformvar"])) {
$contact_note_uuid = $_GET["id"] ?? '';
$sql = "select * from v_contact_notes ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and contact_note_uuid = :contact_note_uuid ";
@@ -164,7 +164,7 @@
$parameters['contact_note_uuid'] = $contact_note_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
if (!empty($row)) {
$contact_note = $row["contact_note"];
$last_mod_date = $row["last_mod_date"];
$last_mod_user = $row["last_mod_user"];
@@ -211,7 +211,7 @@
echo " ".$text['label-contact_note']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <textarea class='formfld' name='contact_note' style='min-width: 100%; height: 400px;'>".$contact_note."</textarea>\n";
echo " <textarea class='formfld' name='contact_note' style='min-width: 100%; height: 400px;'>".escape($contact_note ?? '')."</textarea>\n";
echo "</td>\n";
echo "</tr>\n";
@@ -229,4 +229,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>