mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 18:33:49 +00:00
Fix. Show registrations for extensions with number alias. (#2914)
This commit is contained in:
committed by
FusionPBX
parent
5b95fcfca0
commit
61c90e2bfb
@@ -206,22 +206,31 @@
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['user_context']."</td>\n";
|
||||
|
||||
if (permission_exists('extension_registered')) {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
$found = false;
|
||||
$found_count = 0;
|
||||
foreach ($registrations as $arr) {
|
||||
if (in_array($row['extension'].'@'.$_SESSION['domain_name'],$arr)) {
|
||||
$found = true;
|
||||
$found_count++;
|
||||
}
|
||||
}
|
||||
if ($found) {
|
||||
echo "Yes ($found_count)";
|
||||
} else {
|
||||
echo "No";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
$extension_number = $row['extension'].'@'.$_SESSION['domain_name'];
|
||||
$extension_number_alias = $row['number_alias'];
|
||||
if(strlen($extension_number_alias) > 0) {
|
||||
$extension_number_alias .= '@'.$_SESSION['domain_name'];
|
||||
}
|
||||
$found_count = 0;
|
||||
foreach ($registrations as $arr) {
|
||||
if(
|
||||
($extension_number == $arr['user']) ||
|
||||
($extension_number_alias != '' &&
|
||||
$extension_number_alias == $arr['user']
|
||||
)
|
||||
){
|
||||
$found_count++;
|
||||
}
|
||||
}
|
||||
if ($found_count > 0) {
|
||||
echo "Yes ($found_count)";
|
||||
} else {
|
||||
echo "No";
|
||||
}
|
||||
unset($extension_number, $extension_number_alias, $found_count, $arr);
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['enabled'])."</td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['description']." </td>\n";
|
||||
|
||||
Reference in New Issue
Block a user