mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
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:
@@ -155,7 +155,7 @@ if ($_POST['a'] == 'import') {
|
||||
}
|
||||
|
||||
//insert emails
|
||||
if ($_POST['import_fields']['email'] && is_array($contact['emails']) && @sizeof($contact['emails']) != 0) {
|
||||
if (!empty($contact['emails']) && $_POST['import_fields']['email']) {
|
||||
foreach ($contact['emails'] as $index_2 => $contact_email) {
|
||||
$contact_email_uuid = uuid();
|
||||
$array['contact_emails'][$index_2]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
@@ -168,7 +168,7 @@ if ($_POST['a'] == 'import') {
|
||||
}
|
||||
|
||||
//insert numbers
|
||||
if ($_POST['import_fields']['number'] && is_array($contact['numbers']) && @sizeof($contact['numbers']) != 0) {
|
||||
if (!empty($contact['numbers']) && $_POST['import_fields']['number']) {
|
||||
foreach ($contact['numbers'] as $index_3 => $contact_number) {
|
||||
$contact_phone_uuid = uuid();
|
||||
$array['contact_phones'][$index_3]['domain_uuid'] = $domain_uuid;
|
||||
@@ -183,7 +183,7 @@ if ($_POST['a'] == 'import') {
|
||||
}
|
||||
|
||||
//insert urls
|
||||
if ($_POST['import_fields']['url'] && is_array($contact['urls']) && @sizeof($contact['urls']) != 0) {
|
||||
if (!empty($contact['urls']) && $_POST['import_fields']['url']) {
|
||||
foreach ($contact['urls'] as $index_4 => $contact_url) {
|
||||
$contact_url_uuid = uuid();
|
||||
$array['contact_urls'][$index_4]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
@@ -196,7 +196,7 @@ if ($_POST['a'] == 'import') {
|
||||
}
|
||||
|
||||
//insert addresses
|
||||
if ($_POST['import_fields']['address'] && is_array($contact['addresses']) && @sizeof($contact['addresses']) != 0) {
|
||||
if (!empty($contact['addresses']) && $_POST['import_fields']['address']) {
|
||||
foreach ($contact['addresses'] as $index_5 => $contact_address) {
|
||||
$contact_address_uuid = uuid();
|
||||
$array['contact_addresses'][$index_5]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
@@ -275,7 +275,7 @@ if ($_POST['a'] == 'import') {
|
||||
//*******************************************************************************************
|
||||
|
||||
//check if authenticated
|
||||
if ($_SESSION['contact_auth']['token'] == '') {
|
||||
if (empty($_SESSION['contact_auth']['token'])) {
|
||||
$_SESSION['contact_auth']['referer'] = substr($_SERVER["HTTP_REFERER"], strrpos($_SERVER["HTTP_REFERER"],'/')+1);
|
||||
header("Location: contact_auth.php?source=google&target=".substr($_SERVER["PHP_SELF"], strrpos($_SERVER["PHP_SELF"],'/')+1));
|
||||
exit;
|
||||
@@ -340,7 +340,7 @@ echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\
|
||||
echo " ".$text['label-contact_type']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
if (is_array($_SESSION["contact"]["type"])) {
|
||||
if (!empty($_SESSION["contact"]["type"])) {
|
||||
sort($_SESSION["contact"]["type"]);
|
||||
echo " <select class='formfld' name='import_type'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
@@ -375,7 +375,7 @@ echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-contact_category']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
if (is_array($_SESSION["contact"]["category"])) {
|
||||
if (!empty($_SESSION["contact"]["category"])) {
|
||||
sort($_SESSION["contact"]["category"]);
|
||||
echo " <select class='formfld' name='import_category'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
|
||||
Reference in New Issue
Block a user