Add catch NotFoundException in admin/exercice.php
This commit is contained in:
parent
ad5052bb99
commit
8f2edb7048
@ -4,6 +4,9 @@ if(!defined('ONYX')) exit;
|
||||
|
||||
$p = $out[0];
|
||||
|
||||
//TODO maybe move the try catch to index.html ?
|
||||
try
|
||||
{
|
||||
if (isset($p[2]))
|
||||
{
|
||||
$tmp = explode("-", $p[2]);
|
||||
@ -16,5 +19,18 @@ if (isset($p[2]))
|
||||
|
||||
if (isset($p[3]))
|
||||
$template->assign("ex", new Exercice($p[3], $theme));
|
||||
}
|
||||
catch (ThemeNotFoundException $e)
|
||||
{
|
||||
return "404";
|
||||
}
|
||||
catch(ExerciceNotFoundException $e)
|
||||
{
|
||||
return "404";
|
||||
}
|
||||
catch(ExerciceNotFoundException $e)
|
||||
{
|
||||
return "404";
|
||||
}
|
||||
|
||||
return SALT_ADMIN."/exercice";
|
||||
|
Loading…
Reference in New Issue
Block a user