[Vtigercrm-commits] [vtiger-commits] r4834 - in /vtigercrm/branches/4.2_postgresql_integration: data/CRMEntity.php install/5createTables.inc.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 3 12:28:28 EDT 2006
Author: allanbush
Date: Mon Apr 3 10:28:25 2006
New Revision: 4834
Log:
Fetching id for ticketcomments before inserting into database. Refs #17.
Modified:
vtigercrm/branches/4.2_postgresql_integration/data/CRMEntity.php
vtigercrm/branches/4.2_postgresql_integration/install/5createTables.inc.php
Modified: vtigercrm/branches/4.2_postgresql_integration/data/CRMEntity.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/data/CRMEntity.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/data/CRMEntity.php Mon Apr 3 10:28:25 2006
@@ -740,8 +740,9 @@
else
$ownertype = 'customer';
- $comment = addslashes($_REQUEST['comments']);
- $sql = "insert into ticketcomments values('',".$this->id.",'".$comment."','".$current_user->id."','".$ownertype."','".$current_time."')";
+ $comment = $adb->quote($_REQUEST['comments']);
+ $id = $adb->getUniqueID("ticketcomments_commentid");
+ $sql = "insert into ticketcomments values(".$id.",".$this->id.",".$comment.",'".$current_user->id."','".$ownertype."','".$current_time."')";
$adb->query($sql);
}
function insertIntoFAQCommentTable($table_name, $module)
Modified: vtigercrm/branches/4.2_postgresql_integration/install/5createTables.inc.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/install/5createTables.inc.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/install/5createTables.inc.php Mon Apr 3 10:28:25 2006
@@ -248,6 +248,7 @@
$db->getUniqueID("rss");
$db->getUniqueID("selectquery");
$db->getUniqueID("systems");
+$db->getUniqueID("ticketcomments_commentid");
$db->getUniqueID("wordtemplates");
More information about the vtigercrm-commits
mailing list