[Vtigercrm-commits] [vtiger-commits] r10765 - in /vtigercrm/branches/5.0.3: data/CRMEntity.php modules/Contacts/Contacts.php modules/Emails/Emails.php modules/HelpDesk/HelpDesk.php modules/Notes/Notes.php modules/Products/Products.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 23 11:28:39 EDT 2007
Author: richie
Date: Mon Apr 23 09:28:26 2007
New Revision: 10765
Log:
* Fixed the issue with attachment becuase of not null constraint, Fixed #3673
Modified:
vtigercrm/branches/5.0.3/data/CRMEntity.php
vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
vtigercrm/branches/5.0.3/modules/Emails/Emails.php
vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php
vtigercrm/branches/5.0.3/modules/Notes/Notes.php
vtigercrm/branches/5.0.3/modules/Products/Products.php
Modified: vtigercrm/branches/5.0.3/data/CRMEntity.php
==============================================================================
--- vtigercrm/branches/5.0.3/data/CRMEntity.php (original)
+++ vtigercrm/branches/5.0.3/data/CRMEntity.php Mon Apr 23 09:28:26 2007
@@ -654,8 +654,18 @@
$fieldcolname = $adb->query_result($result1,$i,"columnname");
$tablename = $adb->query_result($result1,$i,"tablename");
$fieldname = $adb->query_result($result1,$i,"fieldname");
-
- $fld_value = $adb->query_result($result[$tablename],0,$fieldcolname);
+
+ //when we don't have entry in the $tablename then we have to avoid retrieve, otherwise adodb error will occur(ex. when we don't have attachment for troubletickets, $result[vtiger_attachments] will not be set so here we should not retrieve)
+ if(isset($result[$tablename]))
+ {
+ $fld_value = $adb->query_result($result[$tablename],0,$fieldcolname);
+ }
+ else
+ {
+ $adb->println("There is no entry for this entity $record ($module) in the table $tablename");
+ $fld_value = "";
+ }
+
$this->column_fields[$fieldname] = $fld_value;
Modified: vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php (original)
+++ vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php Mon Apr 23 09:28:26 2007
@@ -40,8 +40,8 @@
var $db;
var $table_name = "contactdetails";
- var $tab_name = Array('vtiger_crmentity','vtiger_contactdetails','vtiger_contactaddress','vtiger_contactsubdetails','vtiger_contactscf','vtiger_customerdetails','vtiger_attachments');
- var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_contactdetails'=>'contactid','vtiger_contactaddress'=>'contactaddressid','vtiger_contactsubdetails'=>'contactsubscriptionid','vtiger_contactscf'=>'contactid','vtiger_customerdetails'=>'customerid','vtiger_attachments'=>'attachmentsid');
+ var $tab_name = Array('vtiger_crmentity','vtiger_contactdetails','vtiger_contactaddress','vtiger_contactsubdetails','vtiger_contactscf','vtiger_customerdetails');
+ var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_contactdetails'=>'contactid','vtiger_contactaddress'=>'contactaddressid','vtiger_contactsubdetails'=>'contactsubscriptionid','vtiger_contactscf'=>'contactid','vtiger_customerdetails'=>'customerid');
Modified: vtigercrm/branches/5.0.3/modules/Emails/Emails.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/Emails.php (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/Emails.php Mon Apr 23 09:28:26 2007
@@ -46,7 +46,7 @@
var $tab_name = Array('vtiger_crmentity','vtiger_activity');
- var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_activity'=>'activityid','vtiger_seactivityrel'=>'activityid','vtiger_cntactivityrel'=>'activityid','vtiger_attachments'=>'attachmentsid');
+ var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_activity'=>'activityid','vtiger_seactivityrel'=>'activityid','vtiger_cntactivityrel'=>'activityid');
// This is the list of vtiger_fields that are in the lists.
var $list_fields = Array(
Modified: vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php (original)
+++ vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.php Mon Apr 23 09:28:26 2007
@@ -25,7 +25,7 @@
var $db;
var $tab_name = Array('vtiger_crmentity','vtiger_troubletickets','vtiger_ticketcf');
- var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_troubletickets'=>'ticketid','vtiger_seticketsrel'=>'ticketid','vtiger_ticketcf'=>'ticketid','vtiger_ticketcomments'=>'ticketid','vtiger_attachments'=>'attachmentsid');
+ var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_troubletickets'=>'ticketid','vtiger_seticketsrel'=>'ticketid','vtiger_ticketcf'=>'ticketid','vtiger_ticketcomments'=>'ticketid');
var $column_fields = Array();
var $sortby_fields = Array('title','status','priority','crmid','firstname','smownerid');
Modified: vtigercrm/branches/5.0.3/modules/Notes/Notes.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Notes/Notes.php (original)
+++ vtigercrm/branches/5.0.3/modules/Notes/Notes.php Mon Apr 23 09:28:26 2007
@@ -35,8 +35,8 @@
var $default_note_name_dom = array('Meeting vtiger_notes', 'Reminder');
- var $tab_name = Array('vtiger_crmentity','vtiger_notes','vtiger_attachments');
- var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_notes'=>'notesid','vtiger_senotesrel'=>'notesid','vtiger_attachments'=>'attachmentsid');
+ var $tab_name = Array('vtiger_crmentity','vtiger_notes');
+ var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_notes'=>'notesid','vtiger_senotesrel'=>'notesid');
var $column_fields = Array();
Modified: vtigercrm/branches/5.0.3/modules/Products/Products.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Products/Products.php (original)
+++ vtigercrm/branches/5.0.3/modules/Products/Products.php Mon Apr 23 09:28:26 2007
@@ -32,8 +32,8 @@
);
- var $tab_name = Array('vtiger_crmentity','vtiger_products','vtiger_productcf','vtiger_attachments');
- var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_products'=>'productid','vtiger_productcf'=>'productid','vtiger_seproductsrel'=>'productid','vtiger_producttaxrel'=>'productid','vtiger_attachments'=>'attachmentsid');
+ var $tab_name = Array('vtiger_crmentity','vtiger_products','vtiger_productcf');
+ var $tab_name_index = Array('vtiger_crmentity'=>'crmid','vtiger_products'=>'productid','vtiger_productcf'=>'productid','vtiger_seproductsrel'=>'productid','vtiger_producttaxrel'=>'productid');
var $column_fields = Array();
var $sortby_fields = Array('productname','productcode','commissionrate');
More information about the vtigercrm-commits
mailing list