Changeset 10866

Show
Ignore:
Timestamp:
01/09/11 12:06:47 (2 years ago)
Author:
p_lindheimer
Message:

Merged revisions 10848-10849,10858,10864 via svnmerge from
http://www.freepbx.org/v2/svn/freepbx/branches/bootstrap

........

r10848 | p_lindheimer | 2011-01-08 18:16:31 -0800 (Sat, 08 Jan 2011) | 1 line


turns out skip_db is not possible, since all settings come from there, and don't bootstrap recursively

........

r10849 | p_lindheimer | 2011-01-08 18:18:42 -0800 (Sat, 08 Jan 2011) | 1 line


syntax error

........

r10858 | p_lindheimer | 2011-01-09 08:22:41 -0800 (Sun, 09 Jan 2011) | 1 line


track bootstrap steps in case needed, and don't trample overt bootstrap_settings and restrict_mods settings in php-asmanager library

........

r10864 | p_lindheimer | 2011-01-09 08:37:06 -0800 (Sun, 09 Jan 2011) | 1 line


don't remove json.inc.php, other modues may still depend on it

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk

    • Property svnmerge-integrated changed from /freepbx/branches/bootstrap:1-10446,10448-10638,10640-10847 /freepbx/branches/2.8:1-10634 to /freepbx/branches/bootstrap:1-10446,10448-10638,10640-10865 /freepbx/branches/2.8:1-10634
  • freepbx/trunk/amp_conf/bin/generate_hints.php

    r10865 r10866  
    44$restrict_mods = true; 
    55$bootstrap_settings['freepbx_auth'] = false; 
    6 $bootstrap_settings['skip_db'] = true; 
    76if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
    87  include_once('/etc/asterisk/freepbx.conf'); 
  • freepbx/trunk/amp_conf/htdocs/admin/bootstrap.php

    r10865 r10866  
    22/* Bootstrap Settings: 
    33 * 
    4  * bootstrap_settings['skip_db']               - legacy $skip_db, default false 
    54 * bootstrap_settings['skip_astman']           - legacy $skip_astman, default false 
    65 * 
     
    1918 */ 
    2019 
    21 if (!isset($bootstrap_settings['skip_db'])) { 
    22   $bootstrap_settings['skip_db'] = isset($skip_db) ? $skip_db : false; 
    23 } 
    2420if (!isset($bootstrap_settings['skip_astman'])) { 
    2521  $bootstrap_settings['skip_astman'] = isset($skip_astman) ? $skip_astman : false; 
     
    4440// include base functions 
    4541require_once(dirname(__FILE__) . '/functions.inc.php'); 
     42$bootstrap_settings['framework_functions_included'] = true; 
    4643 
    4744//now that its been included, use our own error handler as it tends to be much more verbose. 
     
    5956 
    6057// connect to database 
    61 if (!$bootstrap_settings['skip_db']) { 
    62   require_once(dirname(__FILE__) . '/common/db_connect.php'); //PEAR must be installed 
    63   //keep old values as well so that we have the db settings handy 
    64   // get settings 
    65   $amp_conf = $amp_conf + parse_amportal_conf("/etc/amportal.conf"); 
    66   $asterisk_conf = parse_asterisk_conf($amp_conf["ASTETCDIR"] . "/asterisk.conf"); 
    67 
     58require_once(dirname(__FILE__) . '/common/db_connect.php'); //PEAR must be installed 
     59//keep old values as well so that we have the db settings handy 
     60// get settings 
     61$amp_conf = $amp_conf + parse_amportal_conf("/etc/amportal.conf"); 
     62$asterisk_conf = parse_asterisk_conf($amp_conf["ASTETCDIR"] . "/asterisk.conf"); 
     63$bootstrap_settings['amportal_conf_initialized'] = true; 
    6864 
    6965//set error reporting level if set 
     
    8177      // couldn't connect at all 
    8278      unset( $astman ); 
     79      $bootstrap_settings['astman_connected'] = false; 
     80    } else { 
     81      $bootstrap_settings['astman_connected'] = true; 
    8382    } 
    8483  } 
     84} else { 
     85  $bootstrap_settings['astman_connected'] = true; 
    8586} 
    8687 
     
    135136      } 
    136137    } 
     138    $bootstrap_settings['function_modules_included'] = true; 
    137139  } 
     140} else { 
     141  $bootstrap_settings['function_modules_included'] = false; 
    138142} 
    139143?> 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/lib/defines.php

    r10865 r10866  
    11<?php /* $Id$ */ 
    2 $restrict_mods = true; 
    3 $skip_db = true; 
    4 $skip_astman = true; 
    5 if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
    6   include_once('/etc/asterisk/freepbx.conf'); 
     2if (!isset($bootstrap_settings['amportal_conf_initialized']) || !$bootstrap_settings['amportal_conf_initialized']) { 
     3  $restrict_mods = true; 
     4  $bootstrap_settings['skip_astman'] = true; 
     5  if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
     6    include_once('/etc/asterisk/freepbx.conf'); 
     7  } 
    78} 
    89if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); } 
  • freepbx/trunk/amp_conf/htdocs/admin/libraries/php-asmanager.php

    r10865 r10866  
    2323/** 
    2424* Written for PHP 4.3.4, should work with older PHP 4.x versions.   
    25 * Please submit bug reports, patches, etc to http://sourceforge.net/projects/phpagi/ 
    26 * Gracias. :) 
    2725* 
    2826*/ 
    2927  
    30 $restrict_mods = false; 
    31 $skip_astman = true; 
    32  
    33 if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
    34   include_once('/etc/asterisk/freepbx.conf'); 
    35 
     28  if (!isset($bootstrap_settings['amportal_conf_initialized']) || !$bootstrap_settings['amportal_conf_initialized']) { 
     29    $bootstrap_settings['skip_astman'] = true; 
     30    $restrict_mods = true; 
     31    if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
     32      include_once('/etc/asterisk/freepbx.conf'); 
     33    } 
     34  } 
    3635 
    3736  define('AST_CONFIG_DIR', $amp_conf['ASTETCDIR']);