[Vtigercrm-commits] [vtiger-commits] r6545 - /vtigercrm/trunk/modules/Notes/Save.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sat May 27 14:19:06 EDT 2006


Author: saraj
Date: Sat May 27 12:19:02 2006
New Revision: 6545

Log:
Update the save file in notes module for attachment duplication - ahmed

Modified:
    vtigercrm/trunk/modules/Notes/Save.php

Modified: vtigercrm/trunk/modules/Notes/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Notes/Save.php (original)
+++ vtigercrm/trunk/modules/Notes/Save.php Sat May 27 12:19:02 2006
@@ -53,8 +53,14 @@
 	                $result = $adb->query($attachquery);
 	                $filename = $adb->query_result($result,0,'name');
 	                $filetype = $adb->query_result($result,0,'type');
+			$filepath = $adb->query_result($result,0,'path');
+
 	                $_FILES['filename']['name'] = $filename;
 	                $_FILES['filename']['type'] = $filetype;
+
+			//we should read the file and calculate the size, without setting filesize, attachment will not save
+	                $filesize = filesize($filepath.$filename);
+	                $_FILES['filename']['size'] = $filesize;
 	        }
 }
 																						





More information about the vtigercrm-commits mailing list