Changeset 10737

Show
Ignore:
Timestamp:
12/26/10 13:01:54 (2 years ago)
Author:
mbrevda
Message:

re #4566 - more changes, reverting some stuff that wasnt working properlly and isnt worth the effort

Files:

Legend:

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

    r10717 r10737  
    3333  require_once(dirname(__FILE__) . '/libraries/php-asmanager.php'); 
    3434  $astman = new AGI_AsteriskManager(); 
     35  $amp_conf['ASTMANAGEREVENTS'] = (isset($amp_conf['ASTMANAGEREVENTS']) && $amp_conf['ASTMANAGEREVENTS']) ? $amp_conf['ASTMANAGEREVENTS'] : 'off'; 
    3536  // attempt to connect to asterisk manager proxy 
    3637  if (!isset($amp_conf["ASTMANAGERPROXYPORT"]) || !$res = $astman->connect($amp_conf["ASTMANAGERHOST"] . ":" . $amp_conf["ASTMANAGERPROXYPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
    3738    // attempt to connect directly to asterisk, if no proxy or if proxy failed 
    38     if (!$res = $astman->connect($amp_conf["ASTMANAGERHOST"] . ":" . $amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 
     39    if (!$res = $astman->connect($amp_conf["ASTMANAGERHOST"] . ":" . $amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], $amp_conf['ASTMANAGEREVENTS'])) { 
    3940      // couldn't connect at all 
    4041      unset( $astman ); 
  • freepbx/branches/bootstrap/amp_conf/htdocs/admin/functions.inc.php

    r10727 r10737  
    1515$dirname = dirname(__FILE__); 
    1616 
    17 function __autoload($class) { 
    18   global $dirname; 
    19    
    20   //include gui elements classes 
    21   if  (substr($class,0,4) == 'gui_') { 
    22     require_once($dirname . '/libraries/components.class.php'); 
    23     return; 
    24   } 
    25    
    26   switch($class){ 
    27     case 'xml2Array': 
    28     case 'xml2ModuleArray': 
    29       require_once($dirname . '/libraries/xml2Array.class.php'); 
    30       break; 
    31     case 'cronmanager': 
    32       require_once($dirname . '/libraries/cronmanager.class.php'); 
    33       break; 
    34     case 'moduleHook': 
    35       require_once($dirname . '/libraries/moduleHook.class.php'); 
    36       break; 
    37     case 'notifications': 
    38       require_once($dirname . '/libraries/notifications.class.php'); 
    39       break; 
    40     case 'component': 
    41     case 'guielement': 
    42     case 'guiinput': 
    43     case 'guitext': 
    44       require_once($dirname . '/libraries/components.class.php'); 
    45       break; 
    46     case 'ampuser': 
    47       require_once($dirname . '/libraries/ampuser.class.php'); 
    48       break; 
    49     case 'modulelist': 
    50        
    51       break; 
    52     } 
    53 
    54 require_once($dirname . '/libraries/modulelist.class.php'); //doesnt play nicley in the __autolaoder, need to find out why -MB 
     17require_once($dirname . '/libraries/components.class.php'); 
     18require_once($dirname . '/libraries/xml2Array.class.php'); 
     19require_once($dirname . '/libraries/cronmanager.class.php'); 
     20require_once($dirname . '/libraries/moduleHook.class.php'); 
     21require_once($dirname . '/libraries/notifications.class.php'); 
     22require_once($dirname . '/libraries/ampuser.class.php'); 
     23require_once($dirname . '/libraries/components.class.php'); 
     24require_once($dirname . '/libraries/modulelist.class.php'); 
    5525require_once($dirname . '/libraries/config.functions.php'); 
    5626require_once($dirname . '/libraries/featurecodes.class.php'); 
  • freepbx/branches/bootstrap/amp_conf/htdocs/admin/libraries/php-asmanager.php

    r10558 r10737  
    2727* 
    2828*/ 
    29   if(!defined("AMP_CONF")) { define("AMP_CONF", "/etc/amportal.conf"); } 
     29  
     30$restrict_mods = false; 
     31$skip_astman = true; 
     32 
     33if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
     34  include_once('/etc/asterisk/freepbx.conf'); 
     35
    3036 
    3137  define('AST_CONFIG_DIR', $amp_conf['ASTETCDIR']); 
  • freepbx/branches/bootstrap/amp_conf/htdocs/recordings/includes/bootstrap.php

    r10651 r10737  
    315315include_once("./includes/login.php"); 
    316316 
    317  
    318317?> 
  • freepbx/branches/bootstrap/amp_conf/htdocs/recordings/includes/common.php

    r10317 r10737  
    11<?php 
    2  
     2if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
     3  include_once('/etc/asterisk/freepbx.conf'); 
     4
    35/** 
    46 * @file 
     
    486488include_once("./includes/callme.php"); 
    487489include_once("../admin/functions.inc.php"); 
    488 include_once("../admin/common/php-asmanager.php"); 
     490include_once("../admin/libraries/php-asmanager.php"); 
    489491 
    490492?>