diff options
author | thomascube <thomas@roundcube.net> | 2011-11-08 10:46:03 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-11-08 10:46:03 +0000 |
commit | 06744da24100473aa8180cf07ec1970987d2f66b (patch) | |
tree | 4c045b3a72dda6bede846d2223fc5c8e764eb398 /program/include | |
parent | 3fe6c7082c89c0a8454e015beb08899b36b3b83e (diff) |
Implement common setters for debug mode
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube_imap.php | 13 | ||||
-rw-r--r-- | program/include/rcube_ldap.php | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index a1ddde76d..43d35908f 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -317,6 +317,19 @@ class rcube_imap /** + * Activate/deactivate debug mode + * + * @param boolean $dbg True if IMAP conversation should be logged + * @access public + */ + function set_debug($dbg = true) + { + $this->options['debug'] = $dbg; + $this->conn->setDebug($dbg, array($this, 'debug_handler')); + } + + + /** * Set default message charset * * This will be used for message decoding if a charset specification is not available diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php index ab891e3ea..4fb379254 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -1358,6 +1358,18 @@ class rcube_ldap extends rcube_addressbook /** + * Activate/deactivate debug mode + * + * @param boolean $dbg True if LDAP commands should be logged + * @access public + */ + function set_debug($dbg = true) + { + $this->debug = $dbg; + } + + + /** * Quotes attribute value string * * @param string $str Attribute value |