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:
@@ -61,10 +61,10 @@
|
||||
ini_set('max_execution_time', 7200);
|
||||
|
||||
//get the http get values and set them as php variables
|
||||
$action = $_POST["action"];
|
||||
$from_row = $_POST["from_row"];
|
||||
$delimiter = $_POST["data_delimiter"];
|
||||
$enclosure = $_POST["data_enclosure"];
|
||||
$action = $_POST["action"] ?? '';
|
||||
$from_row = $_POST["from_row"] ?? '';
|
||||
$delimiter = $_POST["data_delimiter"] ?? '';
|
||||
$enclosure = $_POST["data_enclosure"] ?? '';
|
||||
|
||||
//save the data to the csv file
|
||||
if (isset($_POST['data'])) {
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
//copy the csv file
|
||||
//$_POST['submit'] == "Upload" &&
|
||||
if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('contact_upload')) {
|
||||
if (!empty($_FILES['ulfile']['tmp_name']) && is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('contact_upload')) {
|
||||
if ($_POST['type'] == 'csv') {
|
||||
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']);
|
||||
$save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']);
|
||||
@@ -116,8 +116,8 @@
|
||||
$schema[$i]['table'] = $table_name;
|
||||
$schema[$i]['parent'] = $parent_name;
|
||||
foreach ($table['fields'] as $row) {
|
||||
if ($row['deprecated'] !== 'true') {
|
||||
if (is_array($row['name'])) {
|
||||
if (!empty($row['deprecated']) && $row['deprecated'] !== 'true') {
|
||||
if (!empty($row['name'])) {
|
||||
$field_name = $row['name']['text'];
|
||||
}
|
||||
else {
|
||||
@@ -175,7 +175,7 @@
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
//define phone label options
|
||||
if (is_array($_SESSION["contact"]["phone_label"]) && @sizeof($_SESSION["contact"]["phone_label"]) != 0) {
|
||||
if (!empty($_SESSION["contact"]["phone_label"])) {
|
||||
sort($_SESSION["contact"]["phone_label"]);
|
||||
foreach($_SESSION["contact"]["phone_label"] as $row) {
|
||||
$label_options[] = "<option value='".$row.">".$row."</option>";
|
||||
@@ -267,7 +267,7 @@
|
||||
}
|
||||
|
||||
//upload the csv
|
||||
if (file_exists($_SESSION['file']) && $action == 'import') {
|
||||
if (!empty($_SESSION['file']) && file_exists($_SESSION['file']) && $action == 'import') {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
@@ -378,7 +378,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_array($array[$parent][$row_id])) { $y++; }
|
||||
if (!empty($array[$parent][$row_id])) { $y++; }
|
||||
}
|
||||
|
||||
//debug information
|
||||
@@ -410,7 +410,7 @@
|
||||
//view_array($array);
|
||||
|
||||
//save to the data
|
||||
if (is_array($array)) {
|
||||
if (!empty($array)) {
|
||||
$database = new database;
|
||||
$database->app_name = 'contacts';
|
||||
$database->app_uuid = '04481e0e-a478-c559-adad-52bd4174574c';
|
||||
@@ -454,7 +454,7 @@
|
||||
echo " ".$text['label-import_data']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <textarea name='data' id='data' class='formfld' style='width: 100%; min-height: 150px;' wrap='off'>$data</textarea>\n";
|
||||
echo " <textarea name='data' id='data' class='formfld' style='width: 100%; min-height: 150px;' wrap='off'></textarea>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-import_data']."\n";
|
||||
echo "</td>\n";
|
||||
@@ -519,7 +519,7 @@
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
|
||||
if (function_exists('curl_version') && $_SESSION['contact']['google_oauth_client_id']['text'] != '' && $_SESSION['contact']['google_oauth_client_secret']['text'] != '') {
|
||||
if (function_exists('curl_version') && !empty($_SESSION['contact']['google_oauth_client_id']['text']) && !empty($_SESSION['contact']['google_oauth_client_secret']['text'])) {
|
||||
echo "<a href='contact_import_google.php'><img src='resources/images/icon_gcontacts.png' style='width: 21px; height: 21px; border: none; text-decoration: none; margin-right: 5px;' align='absmiddle'>".$text['header-contacts_import_google']."</a>\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user