Changeset 1971
- Timestamp:
- 05/28/06 11:08:25 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php
r1914 r1971 16 16 function parse_amportal_conf($filename) { 17 17 $file = file($filename); 18 foreach ($file as $line) { 19 if (preg_match("/^\s*([a-zA-Z0-9]+)=([a-zA-Z0-9 .&-@=_<>\"\']+)\s*$/",$line,$matches)) { 20 $conf[ $matches[1] ] = $matches[2]; 21 } 18 if (is_array($file)) { 19 foreach ($file as $line) { 20 if (preg_match("/^\s*([a-zA-Z0-9]+)=([a-zA-Z0-9 .&-@=_<>\"\']+)\s*$/",$line,$matches)) { 21 $conf[ $matches[1] ] = $matches[2]; 22 } 23 } 24 } else { 25 die("<h1>Missing or unreadable config file ($filename)...cannot continue</h1>"); 22 26 } 23 27
