mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Messages: Fix misc issues.
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
$user_uuid = $row['user_uuid'];
|
||||
$authorized = true;
|
||||
}
|
||||
unset($sql, $parameters, $row);
|
||||
|
||||
//authorization failed
|
||||
if (!$authorized) {
|
||||
|
||||
@@ -82,8 +82,16 @@
|
||||
$numbers[] = $number_to;
|
||||
}
|
||||
switch ($message['message_direction']) {
|
||||
case 'inbound': $contact[$number_from]['contact_uuid'] = $message['contact_uuid']; break;
|
||||
case 'outbound': $contact[$number_to]['contact_uuid'] = $message['contact_uuid']; break;
|
||||
case 'inbound':
|
||||
if (!is_uuid($contact[$number_from]['contact_uuid'])) {
|
||||
$contact[$number_from]['contact_uuid'] = $message['contact_uuid'];
|
||||
}
|
||||
break;
|
||||
case 'outbound':
|
||||
if (!is_uuid($contact[$number_to]['contact_uuid'])) {
|
||||
$contact[$number_to]['contact_uuid'] = $message['contact_uuid'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
unset($number_from, $number_to);
|
||||
}
|
||||
@@ -131,8 +139,14 @@
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
|
||||
if (!is_null(array_diff($numbers, $destinations))) {
|
||||
|
||||
if (
|
||||
is_array($numbers) &&
|
||||
@sizeof($numbers) != 0 &&
|
||||
is_array($destinations) &&
|
||||
@sizeof($destinations) != 0 &&
|
||||
!is_null(array_diff($numbers, $destinations))
|
||||
) {
|
||||
$numbers = array_diff($numbers, $destinations);
|
||||
}
|
||||
|
||||
@@ -209,9 +223,6 @@
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<center>\n";
|
||||
echo " <span id='contacts_refresh_state'><img src='resources/images/refresh_active.gif' style='width: 16px; height: 16px; border: none; margin-top: 3px; cursor: pointer;' onclick=\"refresh_contacts_stop();\" alt=\"".$text['label-refresh_pause']."\" title=\"".$text['label-refresh_pause']."\"></span> ";
|
||||
echo "</center>\n";
|
||||
|
||||
echo "<script>\n";
|
||||
foreach ($numbers as $number) {
|
||||
@@ -221,5 +232,12 @@
|
||||
}
|
||||
echo "</script>\n";
|
||||
}
|
||||
else {
|
||||
echo "<div style='padding: 15px;'><center>···</center>";
|
||||
}
|
||||
|
||||
echo "<center>\n";
|
||||
echo " <span id='contacts_refresh_state'><img src='resources/images/refresh_active.gif' style='width: 16px; height: 16px; border: none; margin-top: 3px; cursor: pointer;' onclick=\"refresh_contacts_stop();\" alt=\"".$text['label-refresh_pause']."\" title=\"".$text['label-refresh_pause']."\"></span> ";
|
||||
echo "</center>\n";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user