[Vtigercrm-commits] [vtiger-commits] r10889 - /vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun May 13 03:28:54 EDT 2007


Author: richie
Date: Sun May 13 01:28:48 2007
New Revision: 10889

Log:
* Fixed the issue in retrieving the account name, now deleted records will not come.

Modified:
    vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php

Modified: vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php Sun May 13 01:28:48 2007
@@ -3334,21 +3334,26 @@
 	
 	return $del_link;
 }
- function getAccountId($account_name)
-        {
-                 global $log;
-                $log->info("in getAccountId ".$account_name);
-                global $adb;
-                if($account_name != '')
-                {
-			// for avoid single quotes error
-		        $slashes_account_name = popup_from_html($account_name);
-			
-                        $sql = "select accountid from vtiger_account where accountname='".$slashes_account_name."'";
-                        $result = $adb->query($sql);
-                        $accountid = $adb->query_result($result,0,"accountid");
-                }
-                return $accountid;
-        }
+
+/**	function used to get the account id for the given input account name
+ * 	@param string $account_name - account name to which we want the id
+ * 	return int $accountid - accountid for the given account name will be returned
+ */
+function getAccountId($account_name)
+{
+	global $log;
+	$log->info("in getAccountId ".$account_name);
+	global $adb;
+	if($account_name != '')
+	{
+		// for avoid single quotes error
+		$slashes_account_name = popup_from_html($account_name);
+
+		$sql = "select accountid from vtiger_account inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_account.accountid where vtiger_crmentity.deleted=0 and accountname='".$slashes_account_name."'";
+		$result = $adb->query($sql);
+		$accountid = $adb->query_result($result,0,"accountid");
+	}
+	return $accountid;
+}
 
 ?>





More information about the vtigercrm-commits mailing list