Fix. Edit dialplan without running FS may load too long.

This commit is contained in:
Alexey Melnichuk 2015-07-21 11:44:13 +04:00
parent 7cf424003c
commit 55d01cffd4
1 changed files with 13 additions and 6 deletions

View File

@ -508,6 +508,18 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//display the results //display the results
if ($result_count > 0) { if ($result_count > 0) {
//get the list of applications
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$result = event_socket_request($fp, 'api show application');
$installed_app = explode("\n\n", $result);
$installed_app = explode("\n", $installed_app[0]);
unset($result);
unset($fp);
} else {
$installed_app = Array();
}
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2' style='margin: -2px;'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='2' style='margin: -2px;'>\n";
$x = 0; $x = 0;
@ -629,12 +641,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//} //}
//if (strlen($dialplan_detail_tag) == 0 || $dialplan_detail_tag == "action" || $dialplan_detail_tag == "anti-action") { //if (strlen($dialplan_detail_tag) == 0 || $dialplan_detail_tag == "action" || $dialplan_detail_tag == "anti-action") {
echo " <optgroup label='".$text['optgroup-applications']."'>\n"; echo " <optgroup label='".$text['optgroup-applications']."'>\n";
//get the list of applications foreach ($installed_app as $row) {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$result = event_socket_request($fp, 'api show application');
$tmp = explode("\n\n", $result);
$tmp = explode("\n", $tmp[0]);
foreach ($tmp as $row) {
if (strlen($row) > 0) { if (strlen($row) > 0) {
$application = explode(",", $row); $application = explode(",", $row);
if ($application[0] != "name" && stristr($application[0], "[") != true) { if ($application[0] != "name" && stristr($application[0], "[") != true) {