# constant (not authed). } # transfer errors from ?gb-error to gb::$errors if (isset($_GET['gb-error']) && $_GET['gb-error']) { if (is_array($_GET['gb-error'])) { gb::$errors = array_merge(gb::$errors, $_GET['gb-error']); } else { gb::$errors[] = $_GET['gb-error']; } } # preview mode? if (isset($_GET[gb::$preview_query_key]) && gb::$authorized) { gb::$is_preview = true; $version = 'work'; } elseif (isset($_GET[gb::$version_query_key]) && gb::$authorized) { gb::$is_preview = true; $version = $_GET[gb::$version_query_key]; } if (gb::$is_preview === true && isset($_GET[gb::$pathspec_query_key])) { $preview_pathspec = $_GET[gb::$pathspec_query_key]; } if (gb::$is_preview) { header('Cache-Control: no-cache'); } # load plugins gb::load_plugins('request'); gb::event('will-parse-request'); register_shutdown_function(array('gb', 'event'), 'did-handle-request'); if ($gb_request_uri) { if (strpos($gb_request_uri, gb::$categories_prefix) === 0) { # category(ies)