mirror of https://github.com/itflow-org/itflow
Fix issue with Contacts API - Removed contact_auth from Contacts call to the API
This commit is contained in:
parent
c3321dcb0b
commit
1df98166bd
|
|
@ -66,14 +66,6 @@ if (isset($_POST['contact_notes'])) {
|
||||||
$notes = '';
|
$notes = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['contact_auth_method'])) {
|
|
||||||
$auth_method = sanitizeInput($_POST['contact_auth_method']);
|
|
||||||
} elseif ($contact_row) {
|
|
||||||
$auth_method = $contact_row['contact_auth_method'];
|
|
||||||
} else {
|
|
||||||
$auth_method = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST['contact_primary'])) {
|
if (isset($_POST['contact_primary'])) {
|
||||||
$primary = intval($_POST['contact_primary']);
|
$primary = intval($_POST['contact_primary']);
|
||||||
} elseif ($contact_row) {
|
} elseif ($contact_row) {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ if (!empty($name) && !empty($email) && !empty($client_id)) {
|
||||||
if (mysqli_num_rows($email_duplication_sql) == 0) {
|
if (mysqli_num_rows($email_duplication_sql) == 0) {
|
||||||
|
|
||||||
// Insert contact
|
// Insert contact
|
||||||
$insert_sql = mysqli_query($mysqli, "INSERT INTO contacts SET contact_name = '$name', contact_title = '$title', contact_department = '$department', contact_email = '$email', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_notes = '$notes', contact_auth_method = '$auth_method', contact_primary = '$primary', contact_important = '$important', contact_billing = '$billing', contact_technical = '$technical', contact_location_id = $location_id, contact_client_id = $client_id");
|
$insert_sql = mysqli_query($mysqli, "INSERT INTO contacts SET contact_name = '$name', contact_title = '$title', contact_department = '$department', contact_email = '$email', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_notes = '$notes', contact_primary = '$primary', contact_important = '$important', contact_billing = '$billing', contact_technical = '$technical', contact_location_id = $location_id, contact_client_id = $client_id");
|
||||||
|
|
||||||
// Check insert & get insert ID
|
// Check insert & get insert ID
|
||||||
if ($insert_sql) {
|
if ($insert_sql) {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ if (!empty($contact_id)) {
|
||||||
require_once 'contact_model.php';
|
require_once 'contact_model.php';
|
||||||
|
|
||||||
|
|
||||||
$update_sql = mysqli_query($mysqli, "UPDATE contacts SET contact_name = '$name', contact_title = '$title', contact_department = '$department', contact_email = '$email', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_notes = '$notes', contact_auth_method = '$auth_method', contact_primary = '$primary', contact_important = '$important', contact_billing = '$billing', contact_technical = '$technical', contact_location_id = $location_id, contact_client_id = $client_id WHERE contact_id = $contact_id LIMIT 1");
|
$update_sql = mysqli_query($mysqli, "UPDATE contacts SET contact_name = '$name', contact_title = '$title', contact_department = '$department', contact_email = '$email', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_notes = '$notes', contact_primary = '$primary', contact_important = '$important', contact_billing = '$billing', contact_technical = '$technical', contact_location_id = $location_id, contact_client_id = $client_id WHERE contact_id = $contact_id LIMIT 1");
|
||||||
|
|
||||||
// Check insert & get insert ID
|
// Check insert & get insert ID
|
||||||
if ($update_sql) {
|
if ($update_sql) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue