Changeset d559cba in github


Ignore:
Timestamp:
Jul 7, 2009 12:38:31 PM (4 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
8bc018a
Parents:
b6b5934
Message:
  • Added 'imap_debug' option, described 'sql_debug' option in config file
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rb6b5934 rd559cba  
    22=========================== 
    33 
     4- Added 'imap_debug' option 
    45- Support strftime's format modifiers in date_* options (#1484806) 
    56- Support %h variable in 'smtp_server' option (#1485766) 
  • config/main.inc.php.dist

    rb6b5934 rd559cba  
    1515$rcmail_config = array(); 
    1616 
    17  
    1817// system error reporting: 1 = log; 2 = report (not implemented yet), 4 = show, 8 = trace 
    1918$rcmail_config['debug_level'] = 1; 
     
    125124// Log sent messages 
    126125$rcmail_config['smtp_log'] = TRUE; 
     126 
     127// Log SQL queries to <log_dir>/sql or to syslog 
     128$rcmail_config['sql_debug'] = false; 
     129 
     130// Log IMAP conversation to <log_dir>/imap or to syslog 
     131$rcmail_config['imap_debug'] = false; 
    127132 
    128133// How many seconds must pass between emails sent by a user 
  • program/include/rcmail.php

    r0b2ce91 rd559cba  
    367367      'delimiter' => isset($_SESSION['imap_delimiter']) ? $_SESSION['imap_delimiter'] : $this->config->get('imap_delimiter'), 
    368368      'rootdir' => isset($_SESSION['imap_root']) ? $_SESSION['imap_root'] : $this->config->get('imap_root'), 
     369      'debug_mode' => (bool) $this->config->get('imap_debug', 0), 
    369370    ); 
    370371 
  • program/include/rcube_mdb2.php

    rac62299 rd559cba  
    702702    $debug_output = $scope . '('.$db->db_index.'): '; 
    703703    $debug_output .= $message . $db->getOption('log_line_break'); 
    704     write_log('sqllog', $debug_output); 
     704    write_log('sql', $debug_output); 
    705705  } 
    706706} 
    707  
    708  
  • program/lib/imap.inc

    r72cd3c1 rd559cba  
    198198 
    199199function iil_PutLine($fp, $string, $endln=true) { 
    200 //      console('C: '. rtrim($string)); 
     200        global $my_prefs; 
     201         
     202        if(!empty($my_prefs['debug_mode'])) 
     203                write_log('imap', 'C: '. rtrim($string)); 
     204         
    201205        return fputs($fp, $string . ($endln ? "\r\n" : '')); 
    202206} 
     
    226230 
    227231function iil_ReadLine($fp, $size=1024) { 
     232        global $my_prefs; 
     233         
    228234        $line = ''; 
    229235 
     
    241247                        break; 
    242248                } 
    243 //              console('S: '. chop($buffer)); 
     249                if(!empty($my_prefs['debug_mode'])) 
     250                        write_log('imap', 'S: '. chop($buffer)); 
    244251                $line .= $buffer; 
    245252        } while ($buffer[strlen($buffer)-1] != "\n"); 
     
    266273 
    267274function iil_ReadBytes($fp, $bytes) { 
     275        global $my_prefs; 
    268276        $data = ''; 
    269277        $len  = 0; 
     
    274282                        break; //nothing was read -> exit to avoid apache lockups 
    275283                } 
    276 //              console('[...] '. $d); 
     284                if(!empty($my_prefs['debug_mode'])) 
     285                        write_log('imap', 'S: '. $d); 
    277286                $len = strlen($data); 
    278287        } while ($len < $bytes); 
     
    554563                        } else if ($optkey == 'delimiter') { 
    555564                                $my_prefs['delimiter'] = $optval; 
     565                        } else if ($optkey == 'debug_mode') { 
     566                                $my_prefs['debug_mode'] = $optval; 
    556567                        } 
    557568                } 
Note: See TracChangeset for help on using the changeset viewer.