Changeset 7883
- Timestamp:
- 07/03/09 13:49:46 (1 year ago)
- Files:
-
- modules/branches/2.6/iaxsettings/install.php (modified) (1 diff)
- modules/branches/2.6/iaxsettings/module.xml (modified) (2 diffs)
- modules/branches/2.6/iaxsettings/page.iaxsettings.php (modified) (2 diffs)
- modules/branches/2.6/sipsettings/install.php (modified) (1 diff)
- modules/branches/2.6/sipsettings/module.xml (modified) (2 diffs)
- modules/branches/2.6/sipsettings/page.sipsettings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.6/iaxsettings/install.php
r7848 r7883 24 24 25 25 $sql = <<< END 26 CREATE TABLE `iaxsettings` (26 CREATE TABLE IF NOT EXISTS `iaxsettings` ( 27 27 `keyword` VARCHAR (50) NOT NULL default '', 28 28 `data` VARCHAR (255) NOT NULL default '', modules/branches/2.6/iaxsettings/module.xml
r7853 r7883 2 2 <rawname>iaxsettings</rawname> 3 3 <name>IAX Settings</name> 4 <version>2.6.0beta1. 0</version>4 <version>2.6.0beta1.1</version> 5 5 <type>tool</type> 6 6 <category>System Administration</category> … … 14 14 <license>AGPLv3</license> 15 15 <changelog> 16 *2.6.0beta1.1* install script 'if not exists' missing, add check for custom file content 16 17 *2.6.0beta1.0* lots of tweaks, fixed install.php error 17 18 </changelog> modules/branches/2.6/iaxsettings/page.iaxsettings.php
r7855 r7883 102 102 $iax_settings = iaxsettings_get(); 103 103 } 104 $error_displays = array_merge($error_displays,iaxsettings_check_custom_files()); 105 104 106 ?> 105 107 … … 546 548 return $error_display; 547 549 } 548 ?> 550 551 function iaxsettings_check_custom_files() { 552 global $amp_conf; 553 $errors = array(); 554 555 $custom_files[] = $amp_conf['ASTETCDIR']."/iax_general_custom.conf"; 556 $custom_files[] = $amp_conf['ASTETCDIR']."/iax_custom.conf"; 557 558 foreach ($custom_files as $file) { 559 if (file_exists($file)) { 560 $sip_conf = parse_ini_file($file,true); 561 foreach ($sip_conf as $item) { 562 // If setting is an array, then it is a subsection 563 // 564 if (!is_array($item)) { 565 $msg = sprintf(_("Settings in %s may override these, they should be removed"),"<b>$file</b>"); 566 $errors[] = array( 'js' => '', 'div' => $msg); 567 break; 568 } 569 } 570 } 571 } 572 return $errors; 573 } 574 575 576 ?> modules/branches/2.6/sipsettings/install.php
r7831 r7883 24 24 25 25 $sql = <<< END 26 CREATE TABLE `sipsettings` (26 CREATE TABLE IF NOT EXISTS `sipsettings` ( 27 27 `keyword` VARCHAR (50) NOT NULL default '', 28 28 `data` VARCHAR (255) NOT NULL default '', modules/branches/2.6/sipsettings/module.xml
r7852 r7883 2 2 <rawname>sipsettings</rawname> 3 3 <name>SIP Settings</name> 4 <version>2.6.0beta1. 1</version>4 <version>2.6.0beta1.2</version> 5 5 <type>tool</type> 6 6 <category>System Administration</category> … … 14 14 <license>AGPLv3</license> 15 15 <changelog> 16 *2.6.0beta1.2* install script 'if not exists' missing, check for custom file content 16 17 *2.6.0beta1.1* misc bugs, typos 17 18 *2.6.0beta1.0* lots of tweaks, fixed install.php error modules/branches/2.6/sipsettings/page.sipsettings.php
r7872 r7883 135 135 $sip_settings = sipsettings_get(); 136 136 } 137 $error_displays = array_merge($error_displays,sipsettings_check_custom_files()); 138 137 139 ?> 138 140 … … 938 940 return $error_display; 939 941 } 940 ?> 942 943 function sipsettings_check_custom_files() { 944 global $amp_conf; 945 $errors = array(); 946 947 $custom_files[] = $amp_conf['ASTETCDIR']."/sip_nat.conf"; 948 $custom_files[] = $amp_conf['ASTETCDIR']."/sip_general_custom.conf"; 949 $custom_files[] = $amp_conf['ASTETCDIR']."/sip_custom.conf"; 950 951 foreach ($custom_files as $file) { 952 if (file_exists($file)) { 953 $sip_conf = parse_ini_file($file,true); 954 foreach ($sip_conf as $item) { 955 // If setting is an array, then it is a subsection 956 // 957 if (!is_array($item)) { 958 $msg = sprintf(_("Settings in %s may override these, they should be removed"),"<b>$file</b>"); 959 $errors[] = array( 'js' => '', 'div' => $msg); 960 break; 961 } 962 } 963 } 964 } 965 return $errors; 966 } 967 968 969 ?>
