[Vtigercrm-commits] [vtiger-commits] r4835 - /vtigercrm/branches/4.2_postgresql_integration/modules/uploads/add2db.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 3 12:52:36 EDT 2006


Author: allanbush
Date: Mon Apr  3 10:52:33 2006
New Revision: 4835

Log:
Fixed date formatting on attachment creation.  Refs #17.

Modified:
    vtigercrm/branches/4.2_postgresql_integration/modules/uploads/add2db.php

Modified: vtigercrm/branches/4.2_postgresql_integration/modules/uploads/add2db.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/uploads/add2db.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/uploads/add2db.php Mon Apr  3 10:52:33 2006
@@ -40,7 +40,7 @@
 		$current_id = $adb->getUniqueID("crmentity");
 		$desc = $_REQUEST['txtDescription'];
 		$description = addslashes($desc);
-		$date_var = date('YmdHis');
+		$date_var = $adb->database->DBTimeStamp(date('YmdHis'));
 
 		//$data = addslashes(fread(fopen($uploaddir.$binFile, "r"), $filesize));
 		$filenameBase64 = $filename.".base64";
@@ -50,8 +50,8 @@
 		fwrite($wfh,base64_encode(fread($rfh, $filesize)));
 		deleteFile($uploaddir,$filename);
 		
-		$query = "insert into crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime) values('";
-		$query .= $current_id."','".$current_user->id."','".$current_user->id."','".$_REQUEST['return_module'].' Attachment'."','".$description."','".$date_var."')";
+		$query = "insert into crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values('";
+		$query .= $current_id."','".$current_user->id."','".$current_user->id."','".$_REQUEST['return_module'].' Attachment'."','".$description."',".$date_var.",".$date_var.")";
 		$result = $adb->query($query);
 
 		$sql = "insert into attachments values(";





More information about the vtigercrm-commits mailing list