Aleksander Machniak
2013-05-08 9b8d22ebe14a2a6d3f5c8bebee0a3126a72521cc
program/lib/Roundcube/rcube_imap_generic.php
@@ -72,6 +72,8 @@
    const COMMAND_CAPABILITY = 2;
    const COMMAND_LASTLINE   = 4;
    const DEBUG_LINE_LENGTH = 4096;
    /**
     * Object constructor
     */
@@ -3758,6 +3760,7 @@
     * Set the value of the debugging flag.
     *
     * @param   boolean $debug      New value for the debugging flag.
     * @param callback $handler Logging handler function
     *
     * @since   0.5-stable
     */
@@ -3776,6 +3779,11 @@
     */
    private function debug($message)
    {
        if (($len = strlen($message)) > self::DEBUG_LINE_LENGTH) {
            $message = substr_replace($message, "\n-----[debug cut]-----\n",
                self::DEBUG_LINE_LENGTH/2 - 11, $len - self::DEBUG_LINE_LENGTH - 22);
        }
        if ($this->resourceid) {
            $message = sprintf('[%s] %s', $this->resourceid, $message);
        }