thomascube
2006-02-05 88375ff9807785a5843b47e2312d76eef66e0f62
program/include/main.inc
@@ -697,6 +697,22 @@
  }
// remove all expired message cache records
function rcmail_message_cache_gc()
  {
  global $DB, $CONFIG;
  // no cache lifetime configured
  if (empty($CONFIG['message_cache_lifetime']))
    return;
  // get target timestamp
  $ts = get_offset_time($CONFIG['message_cache_lifetime'], -1);
  $DB->query("DELETE FROM ".get_table_name('messages')."
             WHERE  created < ".$DB->fromunixtime($ts));
  }
// convert a string from one charset to another
// this function is not complete and not tested well
@@ -709,7 +725,7 @@
    return $str;
    
  // convert charset using iconv module  
  if (0 && function_exists('iconv') && $from!='UTF-7' && $to!='UTF-7') {
  if (function_exists('iconv') && $from!='UTF-7' && $to!='UTF-7') {
    return iconv($from, $to, $str);
    }
@@ -797,6 +813,7 @@
  if (!$js_rep_table)
    {
    $js_rep_table = $rtf_rep_table = $xml_rep_table = array();
    $xml_rep_table['&'] = '&amp;';
    for ($c=160; $c<256; $c++)  // can be increased to support more charsets
      {
@@ -1506,6 +1523,8 @@
  }
/****** debugging function ********/
function rcube_timer()
  {
  list($usec, $sec) = explode(" ", microtime());