Beispiel #1
0
}
// Initialize the bridge
require_once 'magebridge.class.php';
$magebridge = new MageBridge();
// Mask this request
$magebridge->premask();
// Support for Magento Compiler
$compilerConfig = 'includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}
// Initialize the Magento application
require_once 'app/Mage.php';
try {
    // Determine the Mage::app() arguments from the bridge
    $app_value = $magebridge->getMeta('app_value');
    $app_type = $magebridge->getMeta('app_type');
    // Doublecheck certain values
    if ($app_type == 'website' && $app_value != 'admin') {
        $app_value = (int) $app_value;
    }
    if ($app_value == 'admin') {
        $app_type = null;
    }
    // Initialize app_time for benchmarking
    $app_time = time();
    // Switch debugging
    if ($magebridge->getMeta('debug')) {
        //Varien_Profiler::enable();
        Mage::setIsDeveloperMode(true);
    }
}
// Initialize the bridge
require_once 'magebridge.class.php';
$magebridge = new MageBridge();
// Mask this request
$magebridge->premask();
// Support for Magento Compiler
$compilerConfig = 'includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}
// Initialize the Magento application
require_once 'app/Mage.php';
try {
    // Determine the Mage::app() arguments from the bridge
    $app_value = $magebridge->getMeta('app_value');
    $app_type = $magebridge->getMeta('app_type');
    // Doublecheck certain values
    if ($app_type == 'website' && $app_value != 'admin') {
        $app_value = (int) $app_value;
    }
    if ($app_value == 'admin') {
        $app_type = null;
    }
    // Initialize app_time for benchmarking
    $app_time = time();
    #Varien_Profiler::enable();
    #Mage::setIsDeveloperMode(true);
    // Make sure the headers-sent warning does not throw an exception
    Mage::$headersSentThrowsException = false;
    // Start the Magento application