From 5be6dcf0e2234b22391ad4f654efddd0ba7c0e92 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 15 Apr 2014 19:19:56 +0200 Subject: Remove useless debug_level=8 and javascripts's rcube_console --- program/include/rcmail_output_html.php | 19 +++---------------- program/js/common.js | 30 ------------------------------ 2 files changed, 3 insertions(+), 46 deletions(-) (limited to 'program') diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index a23b8405e..c3232b246 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -519,25 +519,12 @@ class rcmail_output_html extends rcmail_output $output = preg_replace_callback('/]+)>/Ui', array($this, 'alter_form_tag'), $output); $this->footer = preg_replace_callback('/]+)>/Ui', array($this, 'alter_form_tag'), $this->footer); - if ($write) { - // add debug console - if ($realname != 'error' && ($this->config->get('debug_level') & 8)) { - $this->add_footer('' - ); - $this->add_script( - "if (!window.console || !window.console.log) {\n". - " window.console = new rcube_console();\n". - " $('#console').show();\n". - "}", 'foot'); - } - $this->write(trim($output)); - } - else { + if (!$write) { return $output; } + $this->write(trim($output)); + if ($exit) { exit; } diff --git a/program/js/common.js b/program/js/common.js index 3f82b6df8..3d264c3bd 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -529,36 +529,6 @@ function getCookie(name) roundcube_browser.prototype.set_cookie = setCookie; roundcube_browser.prototype.get_cookie = getCookie; -// tiny replacement for Firebox functionality -function rcube_console() -{ - this.log = function(msg) - { - var box = rcube_find_object('dbgconsole'); - - if (box) { - if (msg.charAt(msg.length-1)=='\n') - msg += '--------------------------------------\n'; - else - msg += '\n--------------------------------------\n'; - - // Konqueror doesn't allow to just change the value of hidden element - if (bw.konq) { - box.innerText += msg; - box.value = box.innerText; - } else - box.value += msg; - } - }; - - this.reset = function() - { - var box = rcube_find_object('dbgconsole'); - if (box) - box.innerText = box.value = ''; - }; -}; - var bw = new roundcube_browser(); bw.set_html_class(); -- cgit v1.2.3