Exemple #1
0
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");
        }
        exit;
    }