Changeset 10556
- Timestamp:
- 11/13/10 16:57:56 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/bootstrap/amp_conf/htdocs/admin/bootstrap.php
r10533 r10556 1 1 <?php 2 2 error_reporting(1); 3 //require_once(getenv('FREEPBX_BOOTSTRAP') ? getenv('FREEPBX_BOOTSTRAP') : '/var/www/ht tp/admin/bootstrap.php');3 //require_once(getenv('FREEPBX_BOOTSTRAP') ? getenv('FREEPBX_BOOTSTRAP') : '/var/www/html/admin/bootstrap.php'); 4 4 5 5 // include base functions … … 7 7 8 8 // get settings 9 $amp_conf = parse_amportal_conf("/etc/amportal.conf");9 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 10 10 $asterisk_conf = parse_asterisk_conf($amp_conf["ASTETCDIR"]."/asterisk.conf"); 11 11 if (!isset($skip_astman) || !$skip_astman) { … … 34 34 35 35 if(is_array($active_modules)){ 36 foreach($active_modules as $key => $module) { 36 foreach($active_modules as $key => $module) { 37 37 38 unset($active_modules[$key]['changelog']); 39 //echo '<pre>';print_r($active_modules[$key]['changelog']);echo '</pre>'; 38 40 //include module functions if there not dissabled 39 41 if ( … … 52 54 53 55 //if asterisk isnt running, mark moduels that depend on asterisk as disbaled 54 if (! checkAstMan()) {56 if (!isset($astman) || !$astman) { 55 57 if (( isset($item['needsenginedb']) && strtolower($item['needsenginedb']) == 'yes') 56 58 || (isset($item['needsenginerunning']) && strtolower($item['needsenginerunning']) == 'yes')) { 57 $active_modules[$key][$itemKey]['disabled'] = true; 58 } else { 59 $active_modules[$key][$itemKey]['disabled'] = false; 59 $active_modules[$key]['items'][$itemKey]['disabled'] = true; 60 60 } 61 61 } freepbx/branches/bootstrap/amp_conf/htdocs/admin/config.php
r10543 r10556 52 52 ); 53 53 54 include('header.php'); 54 require('bootstrap.php'); 55 require('libraries/framework_view.functions.php'); 55 56 /* If there is an action request then some sort of update is usually being done. 56 57 This will protect from cross site request forgeries unless disabled. … … 146 147 } 147 148 148 $framework_asterisk_running = checkAstMan(); 149 150 // get all enabled modules 151 // active_modules array used below and in drawselects function and genConf function 152 $active_modules = module_getinfo(false, MODULE_STATUS_ENABLED); 153 149 //draw up freepbx menu 154 150 $fpbx_menu = array(); 155 156 157 151 // pointer to current item in $fpbx_menu, if applicable 158 152 $cur_menuitem = null; … … 160 154 // add module sections to $fpbx_menu 161 155 $types = array(); 156 162 157 if(is_array($active_modules)){ 163 158 foreach($active_modules as $key => $module) { 164 //include module functions 165 if ((!$restrict_mods || isset($restrict_mods[$key])) && is_file("modules/{$key}/functions.inc.php")) { 166 require_once("modules/{$key}/functions.inc.php"); 167 } 168 159 169 160 //create an array of module sections to display 170 161 // stored as [items][$type][$category][$name] = $displayvalue … … 181 172 } 182 173 183 if (!$framework_asterisk_running &&184 ((isset($item['needsenginedb']) && strtolower($item['needsenginedb'] == 'yes')) ||185 (isset($item['needsenginerunning']) && strtolower($item['needsenginerunning'] == 'yes')))186 )187 {188 $item['disabled'] = true;189 } else {190 $item['disabled'] = false;191 }192 193 174 if (!in_array($item['type'], $types)) { 194 175 $types[] = $item['type']; … … 219 200 } 220 201 } 202 221 203 sort($types); 222 204
