svncommit
2008-10-24 c9ca6ada03f27bfe8c86f61f418afb86971f9dff
program/include/main.inc
@@ -189,6 +189,8 @@
    
  $aliases = array(
    'US-ASCII'       => 'ISO-8859-1',
    'ANSI_X3.110-1983' => 'ISO-8859-1',
    'ANSI_X3.4-1968'   => 'ISO-8859-1',
    'UNKNOWN-8BIT'   => 'ISO-8859-15',
    'X-UNKNOWN'      => 'ISO-8859-15',
    'X-USER-DEFINED' => 'ISO-8859-15',
@@ -684,10 +686,10 @@
    $ts = $date;
  else if (!empty($date))
    {
    while (($ts = @strtotime($date))===false)
      {
        // if we have a date in non-rfc format
    // if date parsing fails, we have a date in non-rfc format.
        // remove token from the end and try again
    while ((($ts = @strtotime($date))===false) || ($ts < 0))
      {
        $d = explode(' ', $date);
        array_pop($d);
        if (!$d) break;
@@ -840,6 +842,7 @@
    // try to open specific log file for writing
    if ($fp = @fopen($CONFIG['log_dir'].'/'.$name, 'a')) {
      fwrite($fp, $log_entry);
      fflush($fp);
      fclose($fp);
    }
  }