From efeacf5f226c25436914e0d2f46d9a0498410971 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Wed, 14 Jan 2015 11:20:29 +0100 Subject: [PATCH] Clean admin pages --- onyx/include/admin/chrono.php | 2 -- onyx/include/admin/exercice.php | 31 +++++++++++++++---------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/onyx/include/admin/chrono.php b/onyx/include/admin/chrono.php index f86bbb1d..97cb9bc9 100644 --- a/onyx/include/admin/chrono.php +++ b/onyx/include/admin/chrono.php @@ -2,8 +2,6 @@ if(!defined('ONYX')) exit; -$p = $out[0]; - if (count($p) > 2) { switch($p[2]) diff --git a/onyx/include/admin/exercice.php b/onyx/include/admin/exercice.php index e87e894b..fb560218 100644 --- a/onyx/include/admin/exercice.php +++ b/onyx/include/admin/exercice.php @@ -2,11 +2,16 @@ if(!defined('ONYX')) exit; -$template->assign("fortyp", array("raw" => "RAW", "sha1" => "SHA-1", "md5" => "MD5", "sha224" => "SHA-224", "sha256" => "SHA-256", "sha384" => "SHA-384", "sha512" => "SHA-512", "whirlpool" => "Whirlpool")); +$template->assign("fortyp", array( + "raw" => "RAW", + "sha1" => "SHA-1", + "md5" => "MD5", + "sha224" => "SHA-224", + "sha256" => "SHA-256", + "sha384" => "SHA-384", + "sha512" => "SHA-512", + "whirlpool" => "Whirlpool")); -$p = $out[0]; - -//TODO maybe move the try catch to index.html ? try { if (isset($p[2])) @@ -53,18 +58,12 @@ try $template->assign("ex", $exercice); } -} -catch (ThemeNotFoundException $e) -{ - return "404"; -} -catch(ExerciceNotFoundException $e) -{ - return "404"; -} -catch(ExerciceNotFoundException $e) -{ - return "404"; +} catch (ThemeNotFoundException $e) { + return "404"; +} catch(ExerciceNotFoundException $e) { + return "404"; +} catch(ExerciceNotFoundException $e) { + return "404"; } return "admin/exercice";