Changeset 6584
- Timestamp:
- 09/06/08 19:37:04 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.5/amp_conf/htdocs/admin/functions.inc.php
r6578 r6584 3182 3182 if (isset($xmlarray['module'])) { 3183 3183 // add a couple fields first 3184 $xmlarray['module']['displayname'] = $xmlarray['module']['name'];3184 $xmlarray['module']['displayname'] = str_replace("\n&\n","&",$xmlarray['module']['name']); 3185 3185 if (isset($xmlarray['module']['menuitems'])) { 3186 3186 3187 3187 foreach ($xmlarray['module']['menuitems'] as $item=>$displayname) { 3188 $displayname = str_replace("\n&\n","&",$displayname); 3189 $xmlarray['module']['menuitems'][$item] = $displayname; 3188 3190 $path = '/module/menuitems/'.$item; 3189 3191 3190 3192 // find category 3191 3193 if (isset($parser->attributes[$path]['category'])) { 3192 $category = $parser->attributes[$path]['category'];3194 $category = str_replace("\n&\n","&",$parser->attributes[$path]['category']); 3193 3195 } else if (isset($xmlarray['module']['category'])) { 3194 $category = $xmlarray['module']['category'];3196 $category = str_replace("\n&\n","&",$xmlarray['module']['category']); 3195 3197 } else { 3196 3198 $category = 'Basic'; … … 3245 3247 } 3246 3248 } 3247 3248 3249 return $xmlarray['module']; 3249 3250 } … … 3538 3539 $notifications->delete('freepbx', 'modules_broken'); 3539 3540 } 3541 } 3542 3543 /** Log a debug message to a debug file 3544 * @param string debug message to be printed 3545 * @param string optional mode, default 'a' 3546 * @param string optinal filename, default /tmp/freepbx_debug.log 3547 */ 3548 function freepbx_debug($string, $option='a', $filename='/tmp/freepbx_debug.log') { 3549 $fh = fopen($filename,$option); 3550 fwrite($fh,$string."\n"); 3551 fclose($fh); 3540 3552 } 3541 3553
