Fixed bad url in theme page

This commit is contained in:
Li Chen 2013-12-01 20:03:20 +01:00
commit 5656d116af
3 changed files with 22 additions and 7 deletions

View file

@ -5,9 +5,16 @@ if(!defined('ONYX')) exit;
$p = $out[0];
if (isset($p[2]))
$template->assign("theme", $p[2]);
{
$tmp = explode("-", $p[2]);
$id = intval($tmp[0]);
if ($id == 0)
return "404";
$theme = new Theme($id);
$template->assign("theme", $theme);
}
if (isset($p[3]))
$template->assign("ex", $p[3]);
$template->assign("ex", new Exercice($p[3], $theme));
return "admin/exercice";
return SALT_ADMIN."/exercice";