Changeset 10556

Show
Ignore:
Timestamp:
11/13/10 16:57:56 (3 years ago)
Author:
mbrevda
Message:

re #4566 - restore some changes lost on branching

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/bootstrap/amp_conf/htdocs/admin/bootstrap.php

    r10533 r10556  
    11<?php 
    22error_reporting(1); 
    3 //require_once(getenv('FREEPBX_BOOTSTRAP') ? getenv('FREEPBX_BOOTSTRAP') : '/var/www/http/admin/bootstrap.php'); 
     3//require_once(getenv('FREEPBX_BOOTSTRAP') ? getenv('FREEPBX_BOOTSTRAP') : '/var/www/html/admin/bootstrap.php'); 
    44 
    55// include base functions 
     
    77 
    88// get settings 
    9 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 
     9$amp_conf = parse_amportal_conf("/etc/amportal.conf"); 
    1010$asterisk_conf  = parse_asterisk_conf($amp_conf["ASTETCDIR"]."/asterisk.conf"); 
    1111if (!isset($skip_astman) || !$skip_astman) { 
     
    3434 
    3535if(is_array($active_modules)){ 
    36   foreach($active_modules as $key => $module) {  
     36  foreach($active_modules as $key => $module) { 
     37   
    3738    unset($active_modules[$key]['changelog']); 
     39    //echo '<pre>';print_r($active_modules[$key]['changelog']);echo '</pre>'; 
    3840    //include module functions if there not dissabled 
    3941    if ( 
     
    5254         
    5355        //if asterisk isnt running, mark moduels that depend on asterisk as disbaled 
    54         if (!checkAstMan()) { 
     56        if (!isset($astman) || !$astman) { 
    5557          if (( isset($item['needsenginedb']) && strtolower($item['needsenginedb']) == 'yes')  
    5658          || (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; 
    6060          } 
    6161        } 
  • freepbx/branches/bootstrap/amp_conf/htdocs/admin/config.php

    r10543 r10556  
    5252); 
    5353 
    54 include('header.php'); 
     54require('bootstrap.php'); 
     55require('libraries/framework_view.functions.php'); 
    5556/* If there is an action request then some sort of update is usually being done. 
    5657   This will protect from cross site request forgeries unless disabled. 
     
    146147} 
    147148 
    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 
    154150$fpbx_menu = array(); 
    155  
    156  
    157151// pointer to current item in $fpbx_menu, if applicable 
    158152$cur_menuitem = null; 
     
    160154// add module sections to $fpbx_menu 
    161155$types = array(); 
     156 
    162157if(is_array($active_modules)){ 
    163158  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   
    169160    //create an array of module sections to display 
    170161    // stored as [items][$type][$category][$name] = $displayvalue 
     
    181172        } 
    182173 
    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  
    193174        if (!in_array($item['type'], $types)) { 
    194175          $types[] = $item['type']; 
     
    219200  } 
    220201} 
     202 
    221203sort($types); 
    222204