Skip to content

Commit 0e144d1

Browse files
committed
udpate
1 parent 73517b0 commit 0e144d1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/abuse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ function_requirements('abuse_admin');
8383
$db->query("update abuse_data set abuse_response='" . $db->real_escape($GLOBALS['tf']->variables->request['response']) . "' where abuse_id={$id}", __LINE__, __FILE__);
8484
$db->query("select * from abuse left join abuse_data using (abuse_id) where abuse_id={$id}");
8585
$db->next_record(MYSQL_ASSOC);
86+
if (!is_null($db->Record['abuse_attachments'])) {
87+
$decoded = json_decode($db->Record['abuse_attachments'], true);
88+
$db->Record['abuse_attachments'] = is_array($decoded) ? array_values(array_filter($decoded, 'is_array')) : null;
89+
}
8690
add_output('Abuse Entry Updated <a href="'.$GLOBALS['tf']->link('index.php', 'choice=none.abuse').'">View Pending Abuse Complaints</a>');
8791
}
8892
$smarty->assign($db->Record);

0 commit comments

Comments
 (0)