Пример #1
0
// config|_override.php
if (is_file('config.php')) {
    require_once 'config.php';
    // provides $sugar_config
}
// load up the config_override.php file.  This is used to provide default user settings
if (is_file('config_override.php')) {
    require_once 'config_override.php';
}
if (empty($GLOBALS['installing']) && empty($sugar_config['dbconfig']['db_name'])) {
    header('Location: install.php');
    exit;
}
if (!empty($sugar_config['xhprof_config'])) {
    require_once 'include/SugarXHprof/SugarXHprof.php';
    SugarXHprof::getInstance()->start();
}
// make sure SugarConfig object is available
require_once 'include/SugarObjects/SugarConfig.php';
///////////////////////////////////////////////////////////////////////////////
////	DATA SECURITY MEASURES
require_once 'include/utils.php';
require_once 'include/clean.php';
clean_special_arguments();
clean_incoming_data();
////	END DATA SECURITY MEASURES
///////////////////////////////////////////////////////////////////////////////
// cn: set php.ini settings at entry points
setPhpIniSettings();
require_once 'sugar_version.php';
// provides $sugar_version, $sugar_db_version, $sugar_flavor
Пример #2
0
 /**
  * Tries to load custom profiler. If it doesn't exist then use itself
  *
  * @return SugarXHprof
  */
 public static function getInstance()
 {
     if (self::$instance != null) {
         return self::$instance;
     }
     self::$manager = !empty($GLOBALS['sugar_config']['xhprof_config']['manager']) ? $GLOBALS['sugar_config']['xhprof_config']['manager'] : self::$manager;
     if (is_file('custom/include/SugarXHprof/' . self::$manager . '.php')) {
         require_once 'custom/include/SugarXHprof/' . self::$manager . '.php';
     } elseif (is_file('include/SugarXHprof/' . self::$manager . '.php')) {
         require_once 'include/SugarXHprof/' . self::$manager . '.php';
     }
     if (class_exists(self::$manager) && is_subclass_of(self::$manager, __CLASS__)) {
         self::$instance = new self::$manager();
     } else {
         self::$instance = new self();
     }
     self::$instance->loadConfig();
     return self::$instance;
 }
Пример #3
0
 /**
  * Tries to load custom profiler. If it doesn't exist then use itself
  *
  * @return SugarXHprof
  */
 public static function getInstance()
 {
     if (self::$instance != null) {
         return self::$instance;
     }
     self::loadConfig();
     if (is_file('custom/include/SugarXHprof/' . self::$manager . '.php')) {
         require_once 'custom/include/SugarXHprof/' . self::$manager . '.php';
     } elseif (is_file('include/SugarXHprof/' . self::$manager . '.php')) {
         require_once 'include/SugarXHprof/' . self::$manager . '.php';
     }
     if (class_exists(self::$manager) && is_subclass_of(self::$manager, __CLASS__)) {
         self::$instance = new self::$manager();
     } else {
         self::$instance = new self();
     }
     return self::$instance;
 }