0 && count($url_params) > 0 && strlen($url_params[0]) > 0) { $language = array_shift($url_params); $base_path = "docs/" . $language; } else { $language = null; $base_path = "docs"; } $tree = get_tree($base_path, $base_url, '', true, $language); if ($language === null) { $homepage_url = homepage_url($tree); $docs_url = docs_url($tree); } else { $homepage_url = "/"; } $page = load_page($tree, $url_params); // If a timezone has been set in the config file, override the default PHP timezone for this application. if(isset($options['timezone'])) { date_default_timezone_set($options['timezone']); } // Redirect to docs, if there is no homepage if ($homepage && $homepage_url !== '/') { header('Location: '.$homepage_url); } ?>