From acf697cd1bbc2749460332bd45ab098a4e367382 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 1 Mar 2012 22:02:42 +0100 Subject: Debug now toggleable in backend; used new STE features. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * If __DEBUG__ is true, STE will be in a more verbose mode. * Ratatöskr's frontend STETags now uses the \ste\RuntimeError exception This will also be Beta 3 --- ratatoeskr/backend.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ratatoeskr/backend.php') diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index bf7bb44..6cf00cb 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -1276,6 +1276,21 @@ $backend_subactions = url_action_subactions(array( if($properties[1]) $ste->vars["textprocessors"][] = $txtproc; + /* Toggle debugmode value? */ + if(isset($_POST["toggle_debugmode"])) + { + if(isset($ratatoeskr_settings["debugmode"]) and $ratatoeskr_settings["debugmode"]) + { + $ratatoeskr_settings["debugmode"] = False; + $ste->vars["success"] = $translation["debugmode_now_disabled"]; + } + else + { + $ratatoeskr_settings["debugmode"] = True; + $ste->vars["success"] = $translation["debugmode_now_enabled"]; + } + } + /* Save comment settings? */ if(isset($_POST["save_comment_settings"])) { @@ -1328,6 +1343,7 @@ $backend_subactions = url_action_subactions(array( } } + $ste->vars["debugmode_enabled"] = (isset($ratatoeskr_settings["debugmode"]) and $ratatoeskr_settings["debugmode"]); $ste->vars["comment_auto_visible"] = $ratatoeskr_settings["comment_visible_default"]; $ste->vars["comment_textprocessor"] = $ratatoeskr_settings["comment_textprocessor"]; $ste->vars["used_langs"] = array_map(function ($l) use ($ratatoeskr_settings, $languages) { return array( -- cgit v1.2.3-70-g09d2