Add additional checks for invalid request.
This commit is contained in:
parent
61743f2cac
commit
49c23d4a6b
@ -7,7 +7,9 @@
|
|||||||
$b = explode('/', clean_url($page, "Live"));
|
$b = explode('/', clean_url($page, "Live"));
|
||||||
$output_language = $b[0];
|
$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
|
// Clean Live Url
|
||||||
@ -39,8 +41,10 @@
|
|||||||
$url = explode("/", $url);
|
$url = explode("/", $url);
|
||||||
$file = $docs_path;
|
$file = $docs_path;
|
||||||
foreach ($url as $part) {
|
foreach ($url as $part) {
|
||||||
|
if (isset($tree)) {
|
||||||
$dirs = array_keys($tree);
|
$dirs = array_keys($tree);
|
||||||
$key = array_search($part, array_map("clean_live", $dirs));
|
$key = array_search($part, array_map("clean_live", $dirs));
|
||||||
|
} else $key = FALSE;
|
||||||
if ($key === FALSE) {
|
if ($key === FALSE) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user