0 && count($url_params) > 0 && strlen($url_params[0]) > 0) { $language = array_shift($url_params); $base_path = $options['docs_path'] . $language; } else { $language = null; $base_path = $options['docs_path']; } $tree = get_tree($base_path, $base_url, '', true, $language); $page = load_page($tree, $url_params); // Handle AJAX requests if(isset($_POST["markdown"]) && $options["file_editor"] === true) { handle_editor_post($_POST, $page); die; } // 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); } ?>