[Vtigercrm-commits] [vtiger-commits] r9649 - /vtigercrm/branches/5.0.2/include/utils/export.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Oct 17 06:42:12 EDT 2006


Author: richie
Date: Tue Oct 17 04:42:06 2006
New Revision: 9649

Log:
object for modules has been assigned dynamically --Jeri

Modified:
    vtigercrm/branches/5.0.2/include/utils/export.php

Modified: vtigercrm/branches/5.0.2/include/utils/export.php
==============================================================================
--- vtigercrm/branches/5.0.2/include/utils/export.php (original)
+++ vtigercrm/branches/5.0.2/include/utils/export.php Tue Oct 17 04:42:06 2006
@@ -87,51 +87,15 @@
 {
 	global $log;
 	$log->debug("Entering export_all(".$type.") method ...");
-	$contact_fields = Array();
-	$account_fields = Array();
 	global $adb;
+
 	$focus = 0;
 	$content = '';
 
-	if ($type == "Contacts")
+	if ($type != "")
 	{
-		$focus = new Contact;
+		$focus = new $type;
 	}
-	else if ($type == "Accounts")
-	{
-		$focus = new Account;
-		$exp_query="SELECT columnname, fieldlabel FROM vtiger_field where tabid=6";
-		$account_result=$adb->query($exp_query);
-		if($adb->num_rows($account_result)!=0)
-		{
-			while($result = $adb->fetch_array($account_result))
-			{
-				$account_columnname = $result['columnname'];
-				$account_fieldlabel = $result['fieldlabel'];
-				$account_fields[$account_columnname] = $account_fieldlabel;
-			}
-		}
-	}
-	else if ($type == "Potentials")
-	{
-        	$focus = new Potential;
-	}
-	else if ($type == "Notes")
-	{
-		$focus = new Note;
-	}
-	else if ($type == "Leads")
-	{
-		$focus = new Lead;
-	}
-	else if ($type == "Emails")
-	{
-		$focus = new Email;
-	}
-	else if ($type == "Products")
-        {
-                $focus = new Product;
-        }
 
 	$log = LoggerManager::getLogger('export_'.$type);
 	$db = new PearDatabase();





More information about the vtigercrm-commits mailing list