mirror of
https://github.com/itflow-org/itflow
synced 2026-07-25 09:47:15 +00:00
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
This commit is contained in:
@@ -22,25 +22,25 @@ $ticket_sql = mysqli_query(
|
||||
$row = mysqli_fetch_assoc($ticket_sql);
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_rate = floatval($row['client_rate']);
|
||||
$ticket_prefix = nullable_htmlentities($row['ticket_prefix']);
|
||||
$ticket_prefix = escapeHtml($row['ticket_prefix']);
|
||||
$ticket_number = intval($row['ticket_number']);
|
||||
$ticket_category = intval($row['ticket_category']);
|
||||
$ticket_category_display = nullable_htmlentities($row['category_name']);
|
||||
$ticket_subject = nullable_htmlentities($row['ticket_subject']);
|
||||
$ticket_priority = nullable_htmlentities($row['ticket_priority']);
|
||||
$ticket_category_display = escapeHtml($row['category_name']);
|
||||
$ticket_subject = escapeHtml($row['ticket_subject']);
|
||||
$ticket_priority = escapeHtml($row['ticket_priority']);
|
||||
$ticket_billable = intval($row['ticket_billable']);
|
||||
$ticket_onsite = intval($row['ticket_onsite']);
|
||||
|
||||
$ticket_created_at = nullable_htmlentities($row['ticket_created_at']);
|
||||
$ticket_created_at = escapeHtml($row['ticket_created_at']);
|
||||
$ticket_created_by = intval($row['ticket_created_by']);
|
||||
$ticket_date = date('Y-m-d g:i A', strtotime($ticket_created_at));
|
||||
$ticket_first_response_at = nullable_htmlentities($row['ticket_first_response_at']);
|
||||
$ticket_first_response_at = escapeHtml($row['ticket_first_response_at']);
|
||||
if ($ticket_first_response_at) {
|
||||
$ticket_first_response_date_time = date('Y-m-d g:i A', strtotime($ticket_first_response_at));
|
||||
} else {
|
||||
$ticket_first_response_date_time = '';
|
||||
}
|
||||
$ticket_resolved_at = nullable_htmlentities($row['ticket_resolved_at']);
|
||||
$ticket_resolved_at = escapeHtml($row['ticket_resolved_at']);
|
||||
if ($ticket_resolved_at) {
|
||||
$ticket_resolved_date = date('Y-m-d g:i A', strtotime($ticket_resolved_at));
|
||||
} else {
|
||||
@@ -49,7 +49,7 @@ if ($ticket_resolved_at) {
|
||||
|
||||
$ticket_assigned_to = intval($row['ticket_assigned_to']);
|
||||
if ($ticket_assigned_to) {
|
||||
$ticket_assigned_agent = nullable_htmlentities($row['user_name']);
|
||||
$ticket_assigned_agent = escapeHtml($row['user_name']);
|
||||
} else {
|
||||
$ticket_assigned_agent = '';
|
||||
}
|
||||
@@ -57,24 +57,24 @@ if ($ticket_assigned_to) {
|
||||
$ticket_quote_id = intval($row['ticket_quote_id']);
|
||||
|
||||
$contact_id = intval($row['contact_id']);
|
||||
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||
$contact_name = escapeHtml($row['contact_name']);
|
||||
|
||||
$asset_id = intval($row['asset_id']);
|
||||
$asset_name = nullable_htmlentities($row['asset_name']);
|
||||
$asset_type = nullable_htmlentities($row['asset_type']);
|
||||
$asset_name = escapeHtml($row['asset_name']);
|
||||
$asset_type = escapeHtml($row['asset_type']);
|
||||
|
||||
$location_id = intval($row['location_id']);
|
||||
$location_name = nullable_htmlentities($row['location_name']);
|
||||
$location_address = nullable_htmlentities($row['location_address']);
|
||||
$location_city = nullable_htmlentities($row['location_city']);
|
||||
$location_state = nullable_htmlentities($row['location_state']);
|
||||
$location_zip = nullable_htmlentities($row['location_zip']);
|
||||
$location_name = escapeHtml($row['location_name']);
|
||||
$location_address = escapeHtml($row['location_address']);
|
||||
$location_city = escapeHtml($row['location_city']);
|
||||
$location_state = escapeHtml($row['location_state']);
|
||||
$location_zip = escapeHtml($row['location_zip']);
|
||||
$location_phone = formatPhoneNumber($row['location_phone']);
|
||||
|
||||
//Get Total Ticket Time
|
||||
$ticket_total_reply_time = mysqli_query($mysqli, "SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(ticket_reply_time_worked))) AS ticket_total_reply_time FROM ticket_replies WHERE ticket_reply_archived_at IS NULL AND ticket_reply_ticket_id = $ticket_id");
|
||||
$row = mysqli_fetch_assoc($ticket_total_reply_time);
|
||||
$ticket_total_reply_time = nullable_htmlentities($row['ticket_total_reply_time']);
|
||||
$ticket_total_reply_time = escapeHtml($row['ticket_total_reply_time']);
|
||||
$ticket_total_reply_time_display = formatDuration($ticket_total_reply_time);
|
||||
|
||||
$sql_invoices = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_status LIKE 'Draft' AND invoice_client_id = $client_id ORDER BY invoice_number ASC");
|
||||
@@ -134,12 +134,12 @@ ob_start();
|
||||
|
||||
while ($row = mysqli_fetch_assoc($sql_invoices)) {
|
||||
$invoice_id = intval($row['invoice_id']);
|
||||
$invoice_prefix = nullable_htmlentities($row['invoice_prefix']);
|
||||
$invoice_prefix = escapeHtml($row['invoice_prefix']);
|
||||
$invoice_number = intval($row['invoice_number']);
|
||||
$invoice_scope = nullable_htmlentities($row['invoice_scope']);
|
||||
$invoice_status = nullable_htmlentities($row['invoice_status']);
|
||||
$invoice_date = nullable_htmlentities($row['invoice_date']);
|
||||
$invoice_due = nullable_htmlentities($row['invoice_due']);
|
||||
$invoice_scope = escapeHtml($row['invoice_scope']);
|
||||
$invoice_status = escapeHtml($row['invoice_status']);
|
||||
$invoice_date = escapeHtml($row['invoice_date']);
|
||||
$invoice_due = escapeHtml($row['invoice_due']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
?>
|
||||
<option value="<?php echo $invoice_id; ?>"><?php echo "$invoice_prefix$invoice_number | $invoice_scope"; ?></option>
|
||||
@@ -182,7 +182,7 @@ ob_start();
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Income' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$category_id = intval($row['category_id']);
|
||||
$category_name = nullable_htmlentities($row['category_name']);
|
||||
$category_name = escapeHtml($row['category_name']);
|
||||
?>
|
||||
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
||||
|
||||
@@ -313,7 +313,7 @@ ob_start();
|
||||
$taxes_sql = mysqli_query($mysqli, "SELECT * FROM taxes WHERE tax_archived_at IS NULL ORDER BY tax_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($taxes_sql)) {
|
||||
$tax_id_select = intval($row['tax_id']);
|
||||
$tax_name = nullable_htmlentities($row['tax_name']);
|
||||
$tax_name = escapeHtml($row['tax_name']);
|
||||
$tax_percent = floatval($row['tax_percent']);
|
||||
?>
|
||||
<option value="<?php echo $tax_id_select; ?>"><?php echo "$tax_name $tax_percent%"; ?></option>
|
||||
|
||||
Reference in New Issue
Block a user