From ffe2044de0f9446294d6609a23120fb3a35e2b35 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 17 Dec 2008 06:53:22 +0000 Subject: FreeSWITCH package dialplan recordings details are fixed, if the options aka details for dialplan or public entries did not have child options a deleting parent showed an error added a check for child details to prevent the error. --- packages/freeswitch/freeswitch.inc | 28 +++++++++++----------- packages/freeswitch/freeswitch.xml | 2 +- .../freeswitch/freeswitch_dialplan_includes.tmp | 16 +++++++------ packages/freeswitch/freeswitch_public_includes.tmp | 16 +++++++------ 4 files changed, 33 insertions(+), 29 deletions(-) (limited to 'packages') diff --git a/packages/freeswitch/freeswitch.inc b/packages/freeswitch/freeswitch.inc index a1152daa..a171560d 100644 --- a/packages/freeswitch/freeswitch.inc +++ b/packages/freeswitch/freeswitch.inc @@ -1726,18 +1726,18 @@ function freeswitch_php_install_command() } //delete the recording dialplan details - //if (count($a_dialplan_include_details) > 0) { - // $i = 0; - // foreach ($a_dialplan_include_details as $ent) { - // if ($ent['fielddata'] == "^732673$") { - // unset($a_dialplan_include_details[$i]); - // } - // if ($ent['fielddata'] == "recordings.js") { - // unset($a_dialplan_include_details[$i]); - // } - // $i++; - // } - //} + if (count($a_dialplan_include_details) > 0) { + $i = 0; + foreach ($a_dialplan_include_details as $ent) { + if ($ent['fielddata'] == "^732673$") { + unset($a_dialplan_include_details[$i]); + } + if ($ent['fielddata'] == "recordings.js") { + unset($a_dialplan_include_details[$i]); + } + $i++; + } + } $dialplanincludeid = guid(); @@ -1749,7 +1749,7 @@ function freeswitch_php_install_command() $ent['enabled'] = 'true'; $ent['descr'] = 'Default system recordings tool'; $a_dialplan_includes[] = $ent; - unset($dialplanincludeid); + unset($ent); $ent = array(); $ent['dialplanincludeid'] = $dialplanincludeid; @@ -2028,7 +2028,7 @@ function freeswitch_php_install_command() } $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_version'] = "1.0.1 revision 10638."; - $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_package_version'] = "0.4.8.5"; + $config['installedpackages']['freeswitchsettings']['config'][0]['freeswitch_package_version'] = "0.4.9"; conf_mount_ro(); diff --git a/packages/freeswitch/freeswitch.xml b/packages/freeswitch/freeswitch.xml index 9259a107..c219ff5c 100644 --- a/packages/freeswitch/freeswitch.xml +++ b/packages/freeswitch/freeswitch.xml @@ -44,7 +44,7 @@ Describe your package requirements here Currently there are no FAQ items provided. FreeSWITCH Settings - 0.4.8.5 + 0.4.9 FreeSWITCH: Settings /usr/local/pkg/freeswitch.inc diff --git a/packages/freeswitch/freeswitch_dialplan_includes.tmp b/packages/freeswitch/freeswitch_dialplan_includes.tmp index 2731b6e2..e0b86654 100644 --- a/packages/freeswitch/freeswitch_dialplan_includes.tmp +++ b/packages/freeswitch/freeswitch_dialplan_includes.tmp @@ -73,13 +73,15 @@ if ($_GET['act'] == "del") { $dialplanincludefilename = $order."_".$extensionname.".xml"; //delete the dialplan include details. aka. child data - $i=0; - foreach($a_dialplan_includes_details as $row) { - if ($row["dialplanincludeid"] == $dialplanincludeid) { - //echo "child id: ".$i."
\n"; - unset($a_dialplan_includes_details[$i]); - } - $i++; + if (count($a_dialplan_includes_details) > 0) { + $i=0; + foreach($a_dialplan_includes_details as $row) { + if ($row["dialplanincludeid"] == $dialplanincludeid) { + //echo "child id: ".$i."
\n"; + unset($a_dialplan_includes_details[$i]); + } + $i++; + } } //if the dialplan include xml file exists then delete it diff --git a/packages/freeswitch/freeswitch_public_includes.tmp b/packages/freeswitch/freeswitch_public_includes.tmp index daddadea..4dc6e540 100644 --- a/packages/freeswitch/freeswitch_public_includes.tmp +++ b/packages/freeswitch/freeswitch_public_includes.tmp @@ -73,14 +73,16 @@ if ($_GET['act'] == "del") { $publicincludefilename = $order."_".$extensionname.".xml"; //delete the public include details. aka. child data - $i=0; if (count($a_public_includes_details) > 0) { - foreach($a_public_includes_details as $row) { - if ($row["publicincludeid"] == $publicincludeid) { - //echo "child id: ".$i."
\n"; - unset($a_public_includes_details[$i]); - } - $i++; + $i=0; + if (count($a_public_includes_details) > 0) { + foreach($a_public_includes_details as $row) { + if ($row["publicincludeid"] == $publicincludeid) { + //echo "child id: ".$i."
\n"; + unset($a_public_includes_details[$i]); + } + $i++; + } } } -- cgit v1.2.3