From 7bc2c4843a8036530731a38f02115372b252714e Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 6 Jul 2013 17:03:23 +0000 Subject: [PATCH] Remove lan_sip_profile function which is no longer being used. --- resources/switch.php | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/resources/switch.php b/resources/switch.php index 75a2bcc084..ad33ba4c25 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -352,40 +352,6 @@ function byte_convert($bytes, $decimals = 2) { return $formattedbytes; } -function lan_sip_profile() { - global $config; - clearstatcache(); - - //if the lan directory does not exist then create it - if (!is_readable($_SESSION['switch']['conf']['dir'].'/sip_profiles/lan/')) { - exec("mkdir ".$_SESSION['switch']['conf']['dir']."/sip_profiles/lan/"); - } - - //create the LAN profile if it doesn't exist - if (!file_exists($_SESSION['switch']['conf']['dir'].'/sip_profiles/lan.xml')) { - $lan_ip = $config['interfaces']['lan']['ipaddr']; - if (strlen($lan_ip) > 0) { - exec("cp ".$_SESSION['switch']['conf']['dir']."/sip_profiles/internal.xml ".$_SESSION['switch']['conf']['dir']."/sip_profiles/lan.xml"); - - $filename = $_SESSION['switch']['conf']['dir']."/sip_profiles/lan.xml"; - $handle = fopen($filename,"rb"); - $contents = fread($handle, filesize($filename)); - fclose($handle); - - $handle = fopen($filename,"w"); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - $contents = str_replace("", "", $contents); - fwrite($handle, $contents); - unset($contents); - fclose($handle); - unset($filename); - } - } -} - function ListFiles($dir) { if($dh = opendir($dir)) { $files = Array();