privacy_functions modified to work with MfH
This commit is contained in:
parent
6cad99e6c3
commit
f02af695b8
@ -2077,6 +2077,9 @@ function mfh_print_audit_record($record) {
|
|||||||
case 'audit_unlinked_ticket':
|
case 'audit_unlinked_ticket':
|
||||||
$font_icon = 'fa fa-chain-broken';
|
$font_icon = 'fa fa-chain-broken';
|
||||||
break;
|
break;
|
||||||
|
case 'audit_anonymized':
|
||||||
|
$font_icon = 'fa fa-shield';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$font_icon = 'fa-question-circle';
|
$font_icon = 'fa-question-circle';
|
||||||
break;
|
break;
|
||||||
|
@ -2286,6 +2286,21 @@ function mfh_insert_audit_trail_record($entity_id, $entity_type, $language_key,
|
|||||||
return $audit_id;
|
return $audit_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mfh_anonymize_audit_trail_records($entity_id, $entity_type, $ticket_name) {
|
||||||
|
global $hesk_settings, $hesklang;
|
||||||
|
|
||||||
|
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "audit_trail_to_replacement_values`
|
||||||
|
SET `replacement_value` = REPLACE(`replacement_value`, '" . hesk_dbEscape($ticket_name) . "', '" . hesk_dbEscape($hesklang['anon_name']) . "')
|
||||||
|
WHERE `audit_trail_id` IN (
|
||||||
|
SELECT `id`
|
||||||
|
FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "audit_trail`
|
||||||
|
WHERE `entity_id` = " . intval($entity_id) . "
|
||||||
|
AND `entity_type` = '" . hesk_dbEscape($entity_type) . "')");
|
||||||
|
mfh_insert_audit_trail_record($entity_id, $entity_type, 'audit_anonymized', hesk_date(), array(
|
||||||
|
0 => $_SESSION['name'] . ' (' . $_SESSION['user'] . ')'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
function mfh_can_customer_change_status($status)
|
function mfh_can_customer_change_status($status)
|
||||||
{
|
{
|
||||||
global $hesk_settings;
|
global $hesk_settings;
|
||||||
|
@ -67,6 +67,11 @@ function hesk_anonymizeTicket($id, $trackingID = null, $have_ticket = false)
|
|||||||
`subject` = '".hesk_dbEscape($hesklang['anon_subject'])."',
|
`subject` = '".hesk_dbEscape($hesklang['anon_subject'])."',
|
||||||
`message` = '".hesk_dbEscape($hesklang['anon_message'])."',
|
`message` = '".hesk_dbEscape($hesklang['anon_message'])."',
|
||||||
`ip` = '".hesk_dbEscape($hesklang['anon_IP'])."',
|
`ip` = '".hesk_dbEscape($hesklang['anon_IP'])."',
|
||||||
|
`latitude`= 'E-6',
|
||||||
|
`longitude`='E-6',
|
||||||
|
`user_agent`= '" . hesk_dbEscape($hesklang['anon_user_agent']) . "',
|
||||||
|
`screen_resolution_width`= '" . hesk_dbEscape($hesklang['anon_screen_resolution']) . "',
|
||||||
|
`screen_resolution_height`= '" . hesk_dbEscape($hesklang['anon_screen_resolution']) . "',
|
||||||
";
|
";
|
||||||
for($i=1; $i<=50; $i++)
|
for($i=1; $i<=50; $i++)
|
||||||
{
|
{
|
||||||
@ -74,10 +79,10 @@ function hesk_anonymizeTicket($id, $trackingID = null, $have_ticket = false)
|
|||||||
}
|
}
|
||||||
$sql .= "
|
$sql .= "
|
||||||
attachments='',
|
attachments='',
|
||||||
`history`=REPLACE(`history`, ' ".hesk_dbEscape(addslashes($ticket['name']))."</li>', ' ".hesk_dbEscape($hesklang['anon_name'])."</li>'),
|
`history`=REPLACE(`history`, ' ".hesk_dbEscape(addslashes($ticket['name']))."</li>', ' ".hesk_dbEscape($hesklang['anon_name'])."</li>')
|
||||||
`history`=CONCAT(`history`,'".hesk_dbEscape(sprintf($hesklang['thist18'],hesk_date(),$_SESSION['name'].' ('.$_SESSION['user'].')'))."')
|
|
||||||
WHERE `id`='".intval($ticket['id'])."'";
|
WHERE `id`='".intval($ticket['id'])."'";
|
||||||
hesk_dbQuery($sql);
|
hesk_dbQuery($sql);
|
||||||
|
mfh_anonymize_audit_trail_records($ticket['id'],'TICKET', $ticket['name']);
|
||||||
|
|
||||||
// Anonymize replies
|
// Anonymize replies
|
||||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `name` = '".hesk_dbEscape($hesklang['anon_name'])."', `message` = '".hesk_dbEscape($hesklang['anon_message'])."', attachments='' WHERE `replyto`='".intval($ticket['id'])."'");
|
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `name` = '".hesk_dbEscape($hesklang['anon_name'])."', `message` = '".hesk_dbEscape($hesklang['anon_message'])."', attachments='' WHERE `replyto`='".intval($ticket['id'])."'");
|
||||||
|
@ -683,5 +683,11 @@ $hesklang['emails_to_receive'] = 'Emails to receive';
|
|||||||
$hesklang['emails_sent_to_staff'] = 'Emails sent to staff';
|
$hesklang['emails_sent_to_staff'] = 'Emails sent to staff';
|
||||||
$hesklang['emails_sent_to_customer'] = 'Emails sent to customer';
|
$hesklang['emails_sent_to_customer'] = 'Emails sent to customer';
|
||||||
|
|
||||||
|
// Added or modified in Mods for HESK 4.0.0
|
||||||
|
$hesklang['audit_anonymized'] = '%s anonymized ticket';
|
||||||
|
$hesklang['location_unavailable_6'] = "This ticket was anonymized, so location information has been removed.";
|
||||||
|
$hesklang['anon_user_agent'] = '[User Agent]';
|
||||||
|
$hesklang['anon_screen_resolution'] = '0';
|
||||||
|
|
||||||
// DO NOT CHANGE BELOW
|
// DO NOT CHANGE BELOW
|
||||||
if (!defined('IN_SCRIPT')) die('PHP syntax OK!');
|
if (!defined('IN_SCRIPT')) die('PHP syntax OK!');
|
Loading…
x
Reference in New Issue
Block a user