function run(&$filter_chain, &$request, &$response)
 {
     $filter_chain->next();
     debug::add_timing_point('logging filter started');
     $object = wrap_with_site_object(fetch_requested_object($request));
     $controller = $object->get_controller();
     include_once LIMB_DIR . 'core/model/stats/stats_register.class.php';
     $stats_register = new stats_register();
     $stats_register->register($object->get_node_id(), $controller->get_action(), $request->get_status());
     debug::add_timing_point('logging filter finished');
 }
Ejemplo n.º 2
0
debug::add_timing_point('object fetched');
$site_object_controller =& $site_object->get_controller();
if (($action = $site_object_controller->determine_action()) === false) {
    debug::write_error('"' . $action . '" action not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
    ob_end_clean();
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    }
    header("HTTP/1.1 404 Not found");
    exit;
}
$actions = $object_data['actions'];
if (!isset($actions[$action])) {
    debug::write_error('"' . $action . '" action is not accessible', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
    ob_end_clean();
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    }
    header("HTTP/1.1 403 Access denied");
    exit;
}
$response = $site_object_controller->process();
$stats_register = new stats_register();
$stats_register->register($node['id'], $action, $response->get_status());
$response->perform();
$site_object_controller->display_view();
echo message_box::parse();
if (debug::is_console_enabled()) {
    echo debug::parse_html_console();
}
ob_end_flush();
Ejemplo n.º 3
0
    exit;
}
if (isset($node['only_parent_found']) && $node['only_parent_found']) {
    if (isset($_REQUEST['action'])) {
        $params = '?action=' . $_REQUEST['action'];
    }
    $tree = tree::instance();
    reload($tree->get_path_to_node($node) . $params);
    exit;
}
$user =& user::instance();
if (($object_data =& fetch_one_by_node_id($node['id'], false)) === false) {
    if (!$user->is_logged_in()) {
        $tree = tree::instance();
        $response = new response();
        $stats_register->register(-1, '', $response->get_status());
        $response = new response();
        $stats_register->register(-1, 'redirect', $response->get_status());
        reload('/root/login?redirect=' . $tree->get_path_to_node($node));
        exit;
    } else {
        debug::write_error('content object not allowed or retrieved', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
        ob_end_clean();
        if (debug::is_console_enabled()) {
            echo debug::parse_html_console();
        }
        if (defined("ERROR_DOCUMENT_403")) {
            reload(ERROR_DOCUMENT_403);
        } else {
            header("HTTP/1.1 403 Access denied");
        }