[Vtigercrm-commits] [vtiger-commits] r4703 - /vtigercrm/trunk/modules/Contacts/Contact.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 29 09:09:20 EST 2006


Author: don
Date: Wed Mar 29 07:09:16 2006
New Revision: 4703

Log:
Duplicate code removed

Modified:
    vtigercrm/trunk/modules/Contacts/Contact.php

Modified: vtigercrm/trunk/modules/Contacts/Contact.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.php (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.php Wed Mar 29 07:09:16 2006
@@ -454,26 +454,12 @@
 		return $sql3;
         }
 
-//check if the custom table exists or not in the first place
-function checkIfCustomTableExists()
-{
- $result = $this->db->query("select * from contactscf");
- $testrow = $this->db->num_fields($result);
-	if($testrow > 1)
-	{
-		$exists=true;
-	}
-	else
-	{
-		$exists=false;
-	}
-return $exists;
-}
+
 
         function create_export_query(&$order_by, &$where)
         {
 		global $log;
-		if($this->checkIfCustomTableExists())
+		if($this->checkIfCustomTableExists('contactscf'))
 		{
 	   $query =  $this->constructCustomQueryAddendum() .",
                                 contactdetails.*, contactaddress.*,





More information about the vtigercrm-commits mailing list