Changeset 13083 for freepbx/branches/2.10/amp_conf/htdocs
- Timestamp:
- 12/16/11 22:30:34 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.10/amp_conf/htdocs/admin/bootstrap.php
r13076 r13083 51 51 $benchmark_starttime = microtime_float(); 52 52 53 global $amp_conf; 54 if (empty($amp_conf['AMPWEBROOT'])) { 55 $amp_conf['AMPWEBROOT'] = dirname(dirname(__FILE__)); 56 } 57 $dirname = $amp_conf['AMPWEBROOT'] . '/admin'; 58 59 53 60 if (isset($bootstrap_settings['bootstrapped'])) { 54 61 freepbx_log(FPBX_LOG_ERROR,"Bootstrap has already been called once, bad code somewhere"); … … 69 76 $bootstrap_settings['cdrdb'] = isset($bootstrap_settings['cdrdb']) ? $bootstrap_settings['cdrdb'] : false; 70 77 71 72 78 $restrict_mods = isset($restrict_mods) ? $restrict_mods : false; 73 74 79 75 80 76 81 // include base functions 77 require_once( dirname(__FILE__). '/libraries/utility.functions.php');82 require_once($dirname . '/libraries/utility.functions.php'); 78 83 $bootstrap_settings['framework_functions_included'] = false; 79 require_once( dirname(__FILE__). '/functions.inc.php');84 require_once($dirname . '/functions.inc.php'); 80 85 $bootstrap_settings['framework_functions_included'] = true; 81 86 … … 88 93 } 89 94 90 //include database conifguration 91 if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 92 include_once('/etc/asterisk/freepbx.conf'); 93 } 94 95 // connect to database 96 require_once(dirname(__FILE__) . '/libraries/db_connect.php'); //PEAR must be installed 97 98 99 100 //keep old values as well so that we have the db settings handy 95 // bootstrap.php should always be called from freepbx.conf so 96 // database conifguration already included, connect to database: 97 // 98 require_once($dirname . '/libraries/db_connect.php'); //PEAR must be installed 99 101 100 // get settings 102 101 $freepbx_conf =& freepbx_conf::create(); … … 126 125 $bootstrap_settings['astman_connected'] = false; 127 126 if (!$bootstrap_settings['skip_astman']) { 128 require_once( dirname(__FILE__). '/libraries/php-asmanager.php');127 require_once($dirname . '/libraries/php-asmanager.php'); 129 128 $astman = new AGI_AsteriskManager($bootstrap_settings['astman_config'], $bootstrap_settings['astman_options']); 130 129 // attempt to connect to asterisk manager proxy … … 153 152 } 154 153 } else { 155 require( dirname(__FILE__). '/libraries/gui_auth.php');154 require($dirname . '/libraries/gui_auth.php'); 156 155 frameworkPasswordCheck(); 157 156 } freepbx/branches/2.10/amp_conf/htdocs/admin/config.php
r12995 r13083 60 60 header('Content-Type: text/html; charset=utf-8'); 61 61 62 // This needs to be included BEFORE the session_start or we fail so 63 // we can't do it in bootstrap and thus we have to depend on the 64 // __FILE__ path here. 62 65 require_once(dirname(__FILE__) . '/libraries/ampuser.class.php'); 63 66 … … 90 93 } 91 94 92 require('bootstrap.php'); 95 // call bootstrap.php through freepbx.conf 96 if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 97 include_once('/etc/asterisk/freepbx.conf'); 98 } 93 99 94 100 /* If there is an action request then some sort of update is usually being done. freepbx/branches/2.10/amp_conf/htdocs/admin/functions.inc.php
r13050 r13083 12 12 //GNU General Public License for more details. 13 13 14 $dirname = dirname(__FILE__);14 $dirname = $amp_conf['AMPWEBROOT'] . '/admin'; 15 15 define('MODULE_STATUS_NOTINSTALLED', 0); 16 16 define('MODULE_STATUS_DISABLED', 1); … … 91 91 //freepbx autoloader 92 92 function fpbx_framework_autoloader($class) { 93 $dirname = dirname(__FILE__); 93 global $amp_conf; 94 $dirname = $amp_conf['AMPWEBROOT'] . '/admin'; 94 95 if (substr($class, 0, 3) == 'gui') { 95 96 $class = 'component';
