Remove dimp js debug config parameter
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 18 Nov 2009 02:11:01 +0000 (19:11 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 18 Nov 2009 02:12:15 +0000 (19:12 -0700)
Log to browser error console automatically, if available

imp/config/conf.xml
imp/docs/INSTALL
imp/js/DimpCore.js
imp/templates/javascript_defs_dimp.php

index 0b2fb66..42aa742 100644 (file)
    <configlist name="css_files" required="false" desc="A list of additional CSS
    files to load from the imp/themes/ directory."/>
 
-   <configheader>JavaScript Settings</configheader>
-   <configsection name="js">
-    <configboolean name="debug" required="false" desc="Turn on javascript
-    debugging?  Will cause popup alert windows to appear on various errors.
-    This should be turned off for all production servers.">false</configboolean>
-   </configsection>
-
    <configheader>ViewPort Settings</configheader>
    <configsection name="viewport">
     <configinteger name="buffer_pages" desc="The number of viewable pages to
index 576734c..ad2a21c 100644 (file)
@@ -430,9 +430,8 @@ Only if traditional debugging is unsuccessful will you need to move to
 javascript debugging.  It is highly recommended to use Mozilla Firefox with
 the `Firebug`_ extension installed in order to better track javascript
 errors - it is what the developers use and makes deciphering error codes and
-error line numbers much easier.  It is also recommended to set the ``debug``
-parameter in ``imp/conf/conf.php`` to ``true`` (no quotes).  You will also
-want to turn off javascript caching, if on, in ``horde/conf/conf.php``.
+error line numbers much easier.  You will also want to turn off javascript
+caching, if on, in ``horde/conf/conf.php``.
 
 If you do find a javascript error, it would be great if you could fix the
 issue and provide a patch :)  Absent that, before reporting to the mailing
index c611f70..005f880 100644 (file)
@@ -25,13 +25,8 @@ var DimpCore = {
 
     debug: function(label, e)
     {
-        if (!this.is_logout && DIMP.conf.debug) {
-            if (window.console && window.console.error) {
-                // Firebug error reporting.
-                window.console.error(label, e);
-            } else {
-                alert(label + ': ' + ((e instanceof Error && e.name && e.message) ? e.name + '-' + e.message : Object.inspect(e)) + (e.lineNumber ? ' (Line #' + e.lineNumber + ')' : ''));
-            }
+        if (!this.is_logout && window.console && window.console.error) {
+            window.console.error(label, Prototype.Browser.Gecko ? e : $H(e).inspect());
         }
     },
 
index c864db7..ae7a0a3 100644 (file)
@@ -57,7 +57,6 @@ $code['conf'] = array_filter(array(
     // Other variables
     'app_urls' => $app_urls,
     'buffer_pages' => intval($GLOBALS['conf']['dimp']['viewport']['buffer_pages']),
-    'debug' => intval(!empty($GLOBALS['conf']['dimp']['js']['debug'])),
     'disable_compose' => !IMP::canCompose(),
     'filter_any' => intval($GLOBALS['prefs']->getValue('filter_any_mailbox')),
     'fixed_folders' => empty($GLOBALS['conf']['server']['fixed_folders'])