[Vtigercrm-commits] [vtiger-commits] r3918 - in /vtigercrm/trunk: include/utils/CommonUtils.php modules/uploads/add2db.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Feb 24 03:26:57 EST 2006
Author: saraj
Date: Fri Feb 24 01:26:51 2006
New Revision: 3918
Log:
upload folder changed for attachments
Modified:
vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm/trunk/modules/uploads/add2db.php
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Fri Feb 24 01:26:51 2006
@@ -1180,4 +1180,16 @@
return $count;
}
+function mkdirs($dir) {
+if( is_null($dir) || $dir === "" ){
+ return FALSE;
+}
+if( is_dir($dir) || $dir === "/" ){
+ return TRUE;
+}
+if( mkdirs(dirname($dir), $mode, $recursive) ){
+ return mkdir($dir, $mode);
+}
+return FALSE;
+}
?>
Modified: vtigercrm/trunk/modules/uploads/add2db.php
==============================================================================
--- vtigercrm/trunk/modules/uploads/add2db.php (original)
+++ vtigercrm/trunk/modules/uploads/add2db.php Fri Feb 24 01:26:51 2006
@@ -18,7 +18,7 @@
if(!is_dir($directory))
{
- if(!mkdir($directory, 0777))
+ if(!mkdirs($directory, 0777))
{
echo "Access denined to create folder";
die;
More information about the vtigercrm-commits
mailing list