Exemplo n.º 1
0
 /**
  * Outputs exception information
  * @return type
  */
 public function output()
 {
     if (!defined('AJAX_REQUEST') && Ajax::validateRequest($_REQUEST)) {
         // Return valid JS in ajax requests if the 'fail' status was thrown before ajax initialization
         header('Content-type: application/json');
         $message = json_encode(array('error' => $this->message));
         if (!empty($_REQUEST['callback'])) {
             $message = $_REQUEST['callback'] . "(" . $message . ");";
         }
         echo $message;
         exit;
     } elseif (defined('CONSOLE') || Debugger::isActive() || defined('DEVELOPMENT') && DEVELOPMENT) {
         echo $this->printDebug(defined('CONSOLE'));
     } else {
         $debug = "<!--\n" . $this->printDebug(true) . "\n-->";
         Development::showStub(array('[title]' => 'Service unavailable', '[banner]' => 'Service<br/> unavailable', '[message]' => 'Sorry, service is temporarily unavailable.'), $debug);
     }
 }
Exemplo n.º 2
0
    return;
}
//
// Check if store is closed
//
if (Registry::get('settings.General.store_mode') == 'Y') {
    if (!empty($_REQUEST['store_access_key'])) {
        Tygh::$app['session']['store_access_key'] = $_GET['store_access_key'];
    }
    if (!fn_check_permissions(Registry::get('runtime.controller'), Registry::get('runtime.mode'), 'trusted_controllers')) {
        if (empty(Tygh::$app['session']['store_access_key']) || Tygh::$app['session']['store_access_key'] != Registry::get('settings.General.store_access_key')) {
            if (defined('AJAX_REQUEST')) {
                fn_set_notification('E', __('notice'), __('text_store_closed'));
                exit;
            }
            Development::showStub();
        }
    }
}
if (empty($_REQUEST['product_id']) && empty($_REQUEST['category_id'])) {
    unset(Tygh::$app['session']['current_category_id']);
}
$dispatch = $_REQUEST['dispatch'];
$dynamic_object = array();
if (!empty($_REQUEST['dynamic_object'])) {
    $dynamic_object = $_REQUEST['dynamic_object'];
}
$dynamic_object_scheme = SchemesManager::getDynamicObject($dispatch, AREA, $_REQUEST);
if (!empty($dynamic_object_scheme)) {
    $dispatch = $dynamic_object_scheme['customer_dispatch'];
}