1
0
This commit is contained in:
2020-01-16 10:50:18 +01:00
parent 76b4709d1a
commit 987a0a3c12
13 changed files with 156 additions and 103 deletions

View File

@@ -67,7 +67,7 @@ class Website
if ($result->force_404)
{
$this->serveCustom404($route->full_url, $result);
$this->serveCustom404($route->full_url, $result, $result->force_404_message);
exit();
}
@@ -79,7 +79,7 @@ class Website
}
}
private function serveCustom404(string $uri, PageFrameOptions $frameOpt)
private function serveCustom404(string $uri, PageFrameOptions $frameOpt, string $message)
{
try
{
@@ -88,6 +88,8 @@ class Website
$route = URLRoute::getNotFoundRoute($uri);
$route->parameter['message'] = $message;
$result = $route->getDirect($this, $frameOpt);
$this->output($result, $route);
@@ -184,6 +186,13 @@ class Website
setcookie("mikescher_auth", "", time()+30);
}
public function renderMarkdown(string $txt)
{
require_once 'parsedowncustom.php';
$pd = new ParsedownCustom();
return $pd->text($txt);
}
}
/**