Exemple #1
0
 /**
  * SugarMetric initialization hook
  *
  * Serve "after_entry_point" hook handling
  */
 public function afterEntryPoint()
 {
     if ($this->initialized) {
         return;
     }
     SugarMetric_Helper::run(false);
     $this->initialized = true;
 }
Exemple #2
0
 */
if (!defined('SUGAR_BASE_DIR')) {
    define('SUGAR_BASE_DIR', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../..')));
}
/*
 * First step in removing getimage and getYUIComboFile -- at least this bypasses most of the app,
 * making assets load faster.
 */
if (isset($_GET["entryPoint"])) {
    if ($_GET["entryPoint"] == "getImage") {
        require_once 'include/utils.php';
        require_once 'include/SugarTheme/SugarTheme.php';
        require_once 'include/utils/autoloader.php';
        require_once 'include/SugarLogger/SugarNullLogger.php';
        $GLOBALS['log'] = new SugarNullLogger();
        SugarAutoLoader::init();
        SugarAutoLoader::requireWithCustom('include/SugarMetric/Helper.php');
        SugarMetric_Helper::run('image');
        include "include/SugarTheme/getImage.php";
        die;
    } else {
        if ($_GET["entryPoint"] == "getYUIComboFile") {
            require_once 'include/SugarMetric/Helper.php';
            require_once 'include/SugarLogger/SugarNullLogger.php';
            $GLOBALS['log'] = new SugarNullLogger();
            SugarMetric_Helper::run('YUIComboFile');
            include "include/javascript/getYUIComboFile.php";
            die;
        }
    }
}