8
0

Add additional checks for invalid request.

Dieser Commit ist enthalten in:
Gautham Warrier 2014-03-04 17:28:20 +05:30
Ursprung 61743f2cac
Commit 49c23d4a6b

Datei anzeigen

@ -7,7 +7,9 @@
$b = explode('/', clean_url($page, "Live"));
$output_language = $b[0];
}
return generate_page(clean_url_to_file($page));
$file = clean_url_to_file($page);
if (!is_file($file)) $file = FALSE;
return generate_page($file);
}
// Clean Live Url
@ -39,8 +41,10 @@
$url = explode("/", $url);
$file = $docs_path;
foreach ($url as $part) {
$dirs = array_keys($tree);
$key = array_search($part, array_map("clean_live", $dirs));
if (isset($tree)) {
$dirs = array_keys($tree);
$key = array_search($part, array_map("clean_live", $dirs));
} else $key = FALSE;
if ($key === FALSE) {
return FALSE;
}