[Vtigercrm-commits] [vtiger-commits] r9354 - /vtigercrm/branches/4.2/include/logging.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Sep 8 02:04:47 EDT 2006


Author: allanbush
Date: Fri Sep  8 00:04:44 2006
New Revision: 9354

Log:
Set the umask before initiating log4php so if the log file needs to be created it's created with the permissions specified in the config file.  Closed #1418.

Modified:
    vtigercrm/branches/4.2/include/logging.php

Modified: vtigercrm/branches/4.2/include/logging.php
==============================================================================
--- vtigercrm/branches/4.2/include/logging.php (original)
+++ vtigercrm/branches/4.2/include/logging.php Fri Sep  8 00:04:44 2006
@@ -25,7 +25,13 @@
 require_once(LOG4PHP_DIR.'/LoggerManager.php');
 require_once(LOG4PHP_DIR.'/LoggerPropertyConfigurator.php');
 
+// change the umask so that the log file is created with the proper permissions
+if($log_readable == 1) {
+	$old_umask = umask(0177);
+} else {
+	$old_umask = umask(0577);
+}
 $config = new LoggerPropertyConfigurator();
 $config->configure('log4php.properties');
 
-?>
+?>





More information about the vtigercrm-commits mailing list