Changeset 7894
- Timestamp:
- 07/06/09 01:17:44 (7 months ago)
- Files:
-
- 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/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/module.xml
r7885 r7894 1 1 <module> 2 2 <rawname>iaxsettings</rawname> 3 <name> IAX Settings</name>3 <name>Asterisk IAX Settings</name> 4 4 <version>2.6.0beta1.1</version> 5 5 <type>tool</type> 6 6 <category>System Administration</category> 7 7 <menuitems> 8 <iaxsettings >IAX Settings</iaxsettings>8 <iaxsettings sort="-6">Asterisk IAX Settings</iaxsettings> 9 9 </menuitems> 10 10 <description> … … 14 14 <license>AGPLv3</license> 15 15 <changelog> 16 *2.6.0beta1.1* install script 'if not exists' missing , add check for custom file content16 *2.6.0beta1.1* install script 'if not exists' missing 17 17 *2.6.0beta1.0* lots of tweaks, fixed install.php error 18 18 </changelog> modules/branches/2.6/iaxsettings/page.iaxsettings.php
r7883 r7894 553 553 $errors = array(); 554 554 555 $custom_files[] = $amp_conf['ASTETCDIR']."/iax.conf"; 555 556 $custom_files[] = $amp_conf['ASTETCDIR']."/iax_general_custom.conf"; 556 557 $custom_files[] = $amp_conf['ASTETCDIR']."/iax_custom.conf"; … … 558 559 foreach ($custom_files as $file) { 559 560 if (file_exists($file)) { 560 $sip_conf = parse_ini_file($file,true); 561 foreach ($sip_conf as $item) { 561 $iax_conf = parse_ini_file($file,true); 562 $main = true; // 1 is iax.conf, after that don't care 563 foreach ($iax_conf as $section => $item) { 562 564 // If setting is an array, then it is a subsection 563 565 // 564 566 if (!is_array($item)) { 565 $msg = sprintf(_("Settings in %s may override these, they should be removed"),"<b>$file</b>"); 567 $msg = sprintf(_("Settings in %s may override these, the settings should be removed"),"<b>$file</b>"); 568 $errors[] = array( 'js' => '', 'div' => $msg); 569 break; 570 } elseif ($main && is_array($item) && strtolower($section) == 'general' && !empty($item)) { 571 $msg = sprintf(_("File %s should not have any settings in it, the settings should be removed"),"<b>$file</b>"); 566 572 $errors[] = array( 'js' => '', 'div' => $msg); 567 573 break; 568 574 } 575 $main = false; 569 576 } 570 577 } modules/branches/2.6/sipsettings/module.xml
r7884 r7894 1 1 <module> 2 2 <rawname>sipsettings</rawname> 3 <name> SIP Settings</name>3 <name>Asterisk SIP Settings</name> 4 4 <version>2.6.0beta1.2</version> 5 5 <type>tool</type> 6 6 <category>System Administration</category> 7 7 <menuitems> 8 <sipsettings >SIP Settings</sipsettings>8 <sipsettings sort="-6">Asterisk SIP Settings</sipsettings> 9 9 </menuitems> 10 10 <description> … … 14 14 <license>AGPLv3</license> 15 15 <changelog> 16 *2.6.0beta1.2* install script 'if not exists' missing , check for custom file content16 *2.6.0beta1.2* install script 'if not exists' missing 17 17 *2.6.0beta1.1* misc bugs, typos 18 18 *2.6.0beta1.0* lots of tweaks, fixed install.php error modules/branches/2.6/sipsettings/page.sipsettings.php
r7883 r7894 945 945 $errors = array(); 946 946 947 $custom_files[] = $amp_conf['ASTETCDIR']."/sip.conf"; 947 948 $custom_files[] = $amp_conf['ASTETCDIR']."/sip_nat.conf"; 948 949 $custom_files[] = $amp_conf['ASTETCDIR']."/sip_general_custom.conf"; … … 952 953 if (file_exists($file)) { 953 954 $sip_conf = parse_ini_file($file,true); 954 foreach ($sip_conf as $item) { 955 $main = true; // 1 is sip.conf, after that don't care 956 foreach ($sip_conf as $section => $item) { 955 957 // If setting is an array, then it is a subsection 956 958 // 957 959 if (!is_array($item)) { 958 $msg = sprintf(_("Settings in %s may override these, they should be removed"),"<b>$file</b>"); 960 $msg = sprintf(_("Settings in %s may override these, the settings should be removed"),"<b>$file</b>"); 961 $errors[] = array( 'js' => '', 'div' => $msg); 962 break; 963 } elseif ($main && is_array($item) && strtolower($section) == 'general' && !empty($item)) { 964 $msg = sprintf(_("File %s should not have any settings in it, the settings should be removed"),"<b>$file</b>"); 959 965 $errors[] = array( 'js' => '', 'div' => $msg); 960 966 break; 961 967 } 968 $main = false; 962 969 } 963 970 }
