[Svn] r3003 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Thu Oct 1 08:50:48 CEST 2009


Author: thomasb
Date: 2009-10-01 01:50:48 -0500 (Thu, 01 Oct 2009)
New Revision: 3003

Modified:
   trunk/roundcubemail/program/include/main.inc
Log:
Trigger warning if logs cannot be written

Modified: trunk/roundcubemail/program/include/main.inc
===================================================================
--- trunk/roundcubemail/program/include/main.inc	2009-09-30 18:06:41 UTC (rev 3002)
+++ trunk/roundcubemail/program/include/main.inc	2009-10-01 06:50:48 UTC (rev 3003)
@@ -1042,12 +1042,15 @@
       $CONFIG['log_dir'] = INSTALL_PATH.'logs';
 
     // try to open specific log file for writing
-    if ($fp = @fopen($CONFIG['log_dir'].'/'.$name, 'a')) {
+    $logfile = $CONFIG['log_dir'].'/'.$name;
+    if ($fp = @fopen($logfile, 'a')) {
       fwrite($fp, $log_entry);
       fflush($fp);
       fclose($fp);
       return true;
     }
+    else
+      trigger_error("Error writing to log file $logfile; Please check permissions", E_USER_WARNING);
   }
   return false;
 }

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list