[Vtigercrm-commits] [vtiger-commits] r7002 - in /vtigercrm/branches/4.2: data/ modules/Accounts/ modules/Activities/ modules/Contacts/ modules/CustomView/ modules/Emails/ modules/HelpDesk/ modules/Invoice/ modules/Notes/ modules/Orders/ modules/Potentials/ modules/Products/ modules/Quotes/ modules/Reports/ modules/Users/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Jun 12 16:04:47 EDT 2006


Author: allanbush
Date: Mon Jun 12 14:04:34 2006
New Revision: 7002

Log:
Replaced all instances PearDatabase::quote with $adb->quote as part of php 5 support.  Refs #1287 and Closes #65.

Modified:
    vtigercrm/branches/4.2/data/CRMEntity.php
    vtigercrm/branches/4.2/data/SugarBean.php
    vtigercrm/branches/4.2/modules/Accounts/ListView.php
    vtigercrm/branches/4.2/modules/Accounts/Popup.php
    vtigercrm/branches/4.2/modules/Activities/ListView.php
    vtigercrm/branches/4.2/modules/Contacts/ListView.php
    vtigercrm/branches/4.2/modules/Contacts/Popup.php
    vtigercrm/branches/4.2/modules/CustomView/CustomView.php
    vtigercrm/branches/4.2/modules/Emails/ListView.php
    vtigercrm/branches/4.2/modules/HelpDesk/ListView.php
    vtigercrm/branches/4.2/modules/Invoice/ListView.php
    vtigercrm/branches/4.2/modules/Notes/ListView.php
    vtigercrm/branches/4.2/modules/Orders/ListView.php
    vtigercrm/branches/4.2/modules/Orders/PopupSalesOrder.php
    vtigercrm/branches/4.2/modules/Orders/SalesOrderListView.php
    vtigercrm/branches/4.2/modules/Potentials/ListView.php
    vtigercrm/branches/4.2/modules/Potentials/Popup.php
    vtigercrm/branches/4.2/modules/Products/AddProductsToPriceBook.php
    vtigercrm/branches/4.2/modules/Products/ListView.php
    vtigercrm/branches/4.2/modules/Products/PriceBookListView.php
    vtigercrm/branches/4.2/modules/Products/PriceBookPopup.php
    vtigercrm/branches/4.2/modules/Products/VendorListView.php
    vtigercrm/branches/4.2/modules/Products/VendorPopup.php
    vtigercrm/branches/4.2/modules/Quotes/ListView.php
    vtigercrm/branches/4.2/modules/Quotes/Popup.php
    vtigercrm/branches/4.2/modules/Reports/ReportRun.php
    vtigercrm/branches/4.2/modules/Users/ListView.php

Modified: vtigercrm/branches/4.2/data/CRMEntity.php
==============================================================================
--- vtigercrm/branches/4.2/data/CRMEntity.php (original)
+++ vtigercrm/branches/4.2/data/CRMEntity.php Mon Jun 12 14:04:34 2006
@@ -1216,6 +1216,7 @@
 
 	function get_where(&$fields_array)
 	{ 
+		global $adb;
 		$where_clause = "WHERE "; 
 		$first = 1; 
 		foreach ($fields_array as $name=>$value) 
@@ -1229,7 +1230,7 @@
 				$where_clause .= " AND ";
 			} 
 
-			$where_clause .= "$name = ".PearDatabase::quote($value)."";
+			$where_clause .= "$name = ".$adb->quote($value)."";
 		} 
 
 		$where_clause .= " AND deleted=0";
@@ -1284,6 +1285,7 @@
 	*/
 	function build_generic_where_clause($value){
 			$where_clause = "WHERE "; 
+		global $adb;
 		$first = 1; 
 		foreach ($fields_array as $name=>$value) 
 		{ 
@@ -1296,7 +1298,7 @@
 				$where_clause .= " or";
 			} 
 
-			$where_clause .= "$name = ".PearDatabase::quote($value)."";
+			$where_clause .= "$name = ".$adb->quote($value)."";
 		} 
 
 		$where_clause .= " AND deleted=0";

Modified: vtigercrm/branches/4.2/data/SugarBean.php
==============================================================================
--- vtigercrm/branches/4.2/data/SugarBean.php (original)
+++ vtigercrm/branches/4.2/data/SugarBean.php Mon Jun 12 14:04:34 2006
@@ -116,11 +116,6 @@
 						$insValues = $insValues.", ";
 					}
 				}
-				/*else
-					$query = $query.", ";
-	
-				$query = $query.$field."='".PearDatabase::quote(from_html($this->$field,$isUpdate))."'";
-				*/
 				if($isUpdate)
 				{
 					$updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate));
@@ -553,6 +548,7 @@
 
 	function get_where(&$fields_array)
 	{ 
+		global $adb;
 		$where_clause = "WHERE "; 
 		$first = 1; 
 		foreach ($fields_array as $name=>$value) 
@@ -566,7 +562,7 @@
 				$where_clause .= " AND ";
 			} 
 
-			$where_clause .= "$name = ".PearDatabase::quote($value)."";
+			$where_clause .= "$name = ".$adb->quote($value)."";
 		} 
 
 		$where_clause .= " AND deleted=0";
@@ -621,6 +617,7 @@
 	*/
 	function build_generic_where_clause($value){
 			$where_clause = "WHERE "; 
+		global $adb;
 		$first = 1; 
 		foreach ($fields_array as $name=>$value) 
 		{ 
@@ -633,7 +630,7 @@
 				$where_clause .= " or";
 			} 
 
-			$where_clause .= "$name = ".PearDatabase::quote($value)."";
+			$where_clause .= "$name = ".$adb->quote($value)."";
 		} 
 
 		$where_clause .= " AND deleted=0";

Modified: vtigercrm/branches/4.2/modules/Accounts/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Accounts/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Accounts/ListView.php Mon Jun 12 14:04:34 2006
@@ -99,83 +99,83 @@
 
 	if(isset($name) && $name != "")
 	{
-		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote($name."%"));
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote($name."%"));
 		$url_string .= "&accountname=".$name;
 	}
 	if(isset($website) && $website != "")
 	{
-		array_push($where_clauses, "account.website ".$adb->getLike()." ".PearDatabase::quote("%".$website."%"));
+		array_push($where_clauses, "account.website ".$adb->getLike()." ".$adb->quote("%".$website."%"));
 		$url_string .= "&website=".$website;
 	}
 	if(isset($phone) && $phone != "")
 	{
-		array_push($where_clauses, "(account.phone ".$adb->getLike()." ".PearDatabase::quote("%".$phone."%")." OR account.otherphone ".$adb->getLike()." ".PearDatabase::quote("%".$phone."%")." OR account.fax ".$adb->getLike()." ".PearDatabase::quote("%".$phone."%").")");
+		array_push($where_clauses, "(account.phone ".$adb->getLike()." ".$adb->quote("%".$phone."%")." OR account.otherphone ".$adb->getLike()." ".$adb->quote("%".$phone."%")." OR account.fax ".$adb->getLike()." ".$adb->quote("%".$phone."%").")");
 		$url_string .= "&phone=".$phone;
 	}
 	if(isset($annual_revenue) && $annual_revenue != "")
 	{
-		array_push($where_clauses, "account.annualrevenue ".$adb->getLike()." ".PearDatabase::quote($annual_revenue."%"));
+		array_push($where_clauses, "account.annualrevenue ".$adb->getLike()." ".$adb->quote($annual_revenue."%"));
 		$url_string .= "&annual_revenue=".$annual_revenue;
 	}
 	if(isset($employees) && $employees != "")
 	{
-		array_push($where_clauses, "account.employees ".$adb->getLike()." ".PearDatabase::quote($employees."%"));
+		array_push($where_clauses, "account.employees ".$adb->getLike()." ".$adb->quote($employees."%"));
 		$url_string .= "&employees=".$employees;
 	}
 	if(isset($address_street) && $address_street != "")
 	{
-		array_push($where_clauses, "(accountbillads.street ".$adb->getLike()." ".PearDatabase::quote($address_street."%")." OR accountshipads.street ".$adb->getLike()." ".PearDatabase::quote($address_street."%").")");
+		array_push($where_clauses, "(accountbillads.street ".$adb->getLike()." ".$adb->quote($address_street."%")." OR accountshipads.street ".$adb->getLike()." ".$adb->quote($address_street."%").")");
 		$url_string .= "&address_street=".$address_street;
 	}
 	if(isset($address_city) && $address_city != "")
 	{
-		array_push($where_clauses, "(accountbillads.city ".$adb->getLike()." ".PearDatabase::quote($address_city."%")." OR accountshipads.city ".$adb->getLike()." ".PearDatabase::quote($address_city."%").")");
+		array_push($where_clauses, "(accountbillads.city ".$adb->getLike()." ".$adb->quote($address_city."%")." OR accountshipads.city ".$adb->getLike()." ".$adb->quote($address_city."%").")");
 		$url_string .= "&bill_city=".$address_city;
 	}
 	if(isset($address_state) && $address_state != "")
 	{
-		array_push($where_clauses, "(accountbillads.state ".$adb->getLike()." ".PearDatabase::quote($address_state."%")." OR accountshipads.state ".$adb->getLike()." ".PearDatabase::quote($address_state."%").")");
+		array_push($where_clauses, "(accountbillads.state ".$adb->getLike()." ".$adb->quote($address_state."%")." OR accountshipads.state ".$adb->getLike()." ".$adb->quote($address_state."%").")");
 		$url_string .= "&bill_state=".$address_state;
 	}
 	if(isset($address_postalcode) && $address_postalcode != "")
 	{
-		array_push($where_clauses, "(accountbillads.code ".$adb->getLike()." ".PearDatabase::quote($address_postalcode."%")." OR accountshipads.code ".$adb->getLike()." ".PearDatabase::quote($address_postalcode."%").")");
+		array_push($where_clauses, "(accountbillads.code ".$adb->getLike()." ".$adb->quote($address_postalcode."%")." OR accountshipads.code ".$adb->getLike()." ".$adb->quote($address_postalcode."%").")");
 		$url_string .= "&bill_code=".$address_postalcode;
 	}
 	if(isset($address_country) && $address_country != "")
 	{
-		array_push($where_clauses, "(accountbillads.country ".$adb->getLike()." ".PearDatabase::quote($address_country."%")." OR accountshipads.country ".$adb->getLike()." ".PearDatabase::quote($address_country."%").")");
+		array_push($where_clauses, "(accountbillads.country ".$adb->getLike()." ".$adb->quote($address_country."%")." OR accountshipads.country ".$adb->getLike()." ".$adb->quote($address_country."%").")");
 		$url_string .= "&bill_country=".$address_country;
 	}
 	if(isset($email) && $email != "")
 	{
-		array_push($where_clauses, "(account.email1 ".$adb->getLike()." ".PearDatabase::quote($email."%")." OR account.email2 ".$adb->getLike()." ".PearDatabase::quote($email."%").")");
+		array_push($where_clauses, "(account.email1 ".$adb->getLike()." ".$adb->quote($email."%")." OR account.email2 ".$adb->getLike()." ".$adb->quote($email."%").")");
 		$url_string .= "&email=".$email;
 	}
 	if(isset($industry) && $industry != "")
 	{
-		array_push($where_clauses, "account.industry = ".PearDatabase::quote($industry));
+		array_push($where_clauses, "account.industry = ".$adb->quote($industry));
 		$url_string .= "&industry=".$industry;
 	}
 	if(isset($ownership) && $ownership != "")
 	{
-	 	array_push($where_clauses, "account.ownership ".$adb->getLike()." ".PearDatabase::quote($ownership."%"));
+	 	array_push($where_clauses, "account.ownership ".$adb->getLike()." ".$adb->quote($ownership."%"));
 		$url_string .= "&ownership=".$ownership;
 	}
-	if(isset($rating) && $rating != "") array_push($where_clauses, "account.rating ".$adb->getLike()." ".PearDatabase::quote($rating."%"));
+	if(isset($rating) && $rating != "") array_push($where_clauses, "account.rating ".$adb->getLike()." ".$adb->quote($rating."%"));
 	if(isset($sic_code) && $sic_code != "")
 	{
-		array_push($where_clauses, "account.siccode ".$adb->getLike()." ".PearDatabase::quote($sic_code."%"));
+		array_push($where_clauses, "account.siccode ".$adb->getLike()." ".$adb->quote($sic_code."%"));
 		$url_string .= "&siccode=".$sic_code;
 	}
 	if(isset($ticker_symbol) && $ticker_symbol != "")
 	{
-		array_push($where_clauses, "account.tickersymbol ".$adb->getLike()." ".PearDatabase::quote($ticker_symbol."%"));
+		array_push($where_clauses, "account.tickersymbol ".$adb->getLike()." ".$adb->quote($ticker_symbol."%"));
 		$url_string .= "&tickersymbol=".$ticker_symbol;
 	}
 	if(isset($account_type) && $account_type != "")
 	{
-		array_push($where_clauses, "account.account_type = ".PearDatabase::quote($account_type));
+		array_push($where_clauses, "account.account_type = ".$adb->quote($account_type));
 		$url_string .= "&accounttype=".$account_type;
 	}
 	if(isset($current_user_only) && $current_user_only != "")
@@ -197,7 +197,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= PearDatabase::quote($val);
+			$where .= $adb->quote($val);
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 			   // ACIPIA - to allow prev/next button to use criterias
 			  $url_string .= '&' . urlencode( 'assigned_user_id[]' ) . '=' . $val ;

Modified: vtigercrm/branches/4.2/modules/Accounts/Popup.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Accounts/Popup.php (original)
+++ vtigercrm/branches/4.2/modules/Accounts/Popup.php Mon Jun 12 14:04:34 2006
@@ -89,16 +89,16 @@
 //upto this added for Custom Field
 */	
 	if(isset($name) && $name != ""){
-		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote($name."%"));
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote($name."%"));
 		$url_string .= "&name=".$name;
 	}
-	if(isset($website) && $website != "") array_push($where_clauses, "account.website ".$adb->getLike()." ".PearDatabase::quote("%".$website."%"));
-	if(isset($phone) && $phone != "") array_push($where_clauses, "(account.phone ".$adb->getLike()." ".PearDatabase::quote("%".$phone."%")." OR account.otherphone ".$adb->getLike()." ".PearDatabase::quote("%".$phone."%")." OR account.fax ".$adb->getLike()." ".PearDatabase::quote("%".$phone."%").")");
+	if(isset($website) && $website != "") array_push($where_clauses, "account.website ".$adb->getLike()." ".$adb->quote("%".$website."%"));
+	if(isset($phone) && $phone != "") array_push($where_clauses, "(account.phone ".$adb->getLike()." ".$adb->quote("%".$phone."%")." OR account.otherphone ".$adb->getLike()." ".$adb->quote("%".$phone."%")." OR account.fax ".$adb->getLike()." ".$adb->quote("%".$phone."%").")");
 	if(isset($address_city) && $address_city != ""){
-		array_push($where_clauses, "(accountbillads.city ".$adb->getLike()." ".PearDatabase::quote("%".$address_city."%")." OR accountshipads.city ".$adb->getLike()." ".PearDatabase::quote($address_city."%").")");
+		array_push($where_clauses, "(accountbillads.city ".$adb->getLike()." ".$adb->quote("%".$address_city."%")." OR accountshipads.city ".$adb->getLike()." ".$adb->quote($address_city."%").")");
 		$url_string .= "&address_city=".$address_city;
 	}
-	if(isset($ownership) && $ownership != "") array_push($where_clauses, "account.ownership ".$adb->getLike()." ".PearDatabase::quote($ownership."%"));
+	if(isset($ownership) && $ownership != "") array_push($where_clauses, "account.ownership ".$adb->getLike()." ".$adb->quote($ownership."%"));
 	if(isset($current_user_only) && $current_user_only != ""){
 		array_push($where_clauses, "crmentity.smownerid='$current_user->id'");
 		$url_string .= "&current_user_only=".$current_user_only;
@@ -118,7 +118,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= PearDatabase::quote($val);
+			$where .= $adb->quote($val);
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 		}
 	}

Modified: vtigercrm/branches/4.2/modules/Activities/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Activities/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Activities/ListView.php Mon Jun 12 14:04:34 2006
@@ -119,20 +119,20 @@
 	}
 	if(isset($name) && $name != '')
 	{
-		array_push($where_clauses, "activity.subject ".$adb->getLike()." ".PearDatabase::quote($name.'%')."");
+		array_push($where_clauses, "activity.subject ".$adb->getLike()." ".$adb->quote($name.'%')."");
 		$url_string .= "&name=".$name;
 	}
 	if(isset($contactname) && $contactname != '')
 	{
 		//$contactnames = explode(" ", $contactname);
 		//foreach ($contactnames as $name) {
-		array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()." ".PearDatabase::quote($contactname.'%')." OR contactdetails.lastname ".$adb->getLike()." ".PearDatabase::quote($contactname.'%').")");
+		array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()." ".$adb->quote($contactname.'%')." OR contactdetails.lastname ".$adb->getLike()." ".$adb->quote($contactname.'%').")");
 		$url_string .= "&contactname=".$contactname;
 		//}
 	}
 	if(isset($duedate) && $duedate != '')
 	{
-		array_push($where_clauses, "activity.duedate ".$adb->getLike()." ".PearDatabase::quote($datedue.'%')."");
+		array_push($where_clauses, "activity.duedate ".$adb->getLike()." ".$adb->quote($datedue.'%')."");
 	}
 	if(isset($status) && $status != '')
 	{
@@ -141,7 +141,7 @@
 		$the_where_clause = "(";
 		$val = reset($each_status);
 		do {
-			$the_where_clause .= "activity.status = ".PearDatabase::quote($val);
+			$the_where_clause .= "activity.status = ".$adb->quote($val);
 			$val = next($each_status);
 			if ($val) $the_where_clause .= " OR ";
 		} while($val);

Modified: vtigercrm/branches/4.2/modules/Contacts/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Contacts/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Contacts/ListView.php Mon Jun 12 14:04:34 2006
@@ -101,59 +101,59 @@
 
 
 	if(isset($lastname) && $lastname != "") {
-			array_push($where_clauses, "contactdetails.lastname ".$adb->getLike()." ".PearDatabase::quote($lastname.'%')."");
+			array_push($where_clauses, "contactdetails.lastname ".$adb->getLike()." ".$adb->quote($lastname.'%')."");
 			$url_string .= "&lastname=".$lastname;
 	}
 	if(isset($firstname) && $firstname != "") {
-			array_push($where_clauses, "contactdetails.firstname ".$adb->getLike()." ".PearDatabase::quote($firstname.'%')."");
+			array_push($where_clauses, "contactdetails.firstname ".$adb->getLike()." ".$adb->quote($firstname.'%')."");
 			$url_string .= "&firstname=".$firstname;
 	}
 	if(isset($accountname) && $accountname != "")	{
-			array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote($accountname.'%')."");
+			array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote($accountname.'%')."");
 			$url_string .= "&accountname=".$accountname;
 	}
 	if(isset($leadsource) && $leadsource != "") {
-			array_push($where_clauses, "contactsubdetails.leadsource = ".PearDatabase::quote($leadsource)."");
+			array_push($where_clauses, "contactsubdetails.leadsource = ".$adb->quote($leadsource)."");
 			$url_string .= "&leadsource=".$leadsource;
 	}
 	if(isset($donotcall) && $donotcall != "") {
-			array_push($where_clauses, "contactdetails.donotcall = ".PearDatabase::quote($donotcall)."");
+			array_push($where_clauses, "contactdetails.donotcall = ".$adb->quote($donotcall)."");
 			$url_string .= "&donotcall=".$donotcall;
 	}
 	if(isset($phone) && $phone != "") {
-			array_push($where_clauses, "(contactdetails.phone ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%')." OR contactdetails.mobile ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%')." OR contactdetails.fax ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%').")");
+			array_push($where_clauses, "(contactdetails.phone ".$adb->getLike()." ".$adb->quote('%'.$phone.'%')." OR contactdetails.mobile ".$adb->getLike()." ".$adb->quote('%'.$phone.'%')." OR contactdetails.fax ".$adb->getLike()." ".$adb->quote('%'.$phone.'%').")");
 			$url_string .= "&phone=".$phone;
 	}
 	if(isset($email) && $email != "") {
-			array_push($where_clauses, "(contactdetails.email ".$adb->getLike()." ".PearDatabase::quote($email.'%').")");
+			array_push($where_clauses, "(contactdetails.email ".$adb->getLike()." ".$adb->quote($email.'%').")");
 			$url_string .= "&email=".$email;
 	}
 	if(isset($yahooid) && $yahooid != "") {
-			array_push($where_clauses, "contactdetails.yahooid ".$adb->getLike()." ".PearDatabase::quote($yahooid.'%')."");
+			array_push($where_clauses, "contactdetails.yahooid ".$adb->getLike()." ".$adb->quote($yahooid.'%')."");
 			$url_string .= "&yahooid=".$yahooid;
 	}
 	if(isset($assistant) && $assistant != "") {
-			array_push($where_clauses, "contactsubdetails.assistant ".$adb->getLike()." ".PearDatabase::quote($assistant.'%')."");
+			array_push($where_clauses, "contactsubdetails.assistant ".$adb->getLike()." ".$adb->quote($assistant.'%')."");
 			$url_string .= "&yahooid=".$yahooid;
 	}
 	if(isset($mailingstreet) && $mailingstreet != "") {
-			array_push($where_clauses, "(contactaddress.mailingstreet ".$adb->getLike()." ".PearDatabase::quote($mailingstreet.'%')." OR contactaddress.otherstreet ".$adb->getLike()." ".PearDatabase::quote($mailingstreet.'%').")");
+			array_push($where_clauses, "(contactaddress.mailingstreet ".$adb->getLike()." ".$adb->quote($mailingstreet.'%')." OR contactaddress.otherstreet ".$adb->getLike()." ".$adb->quote($mailingstreet.'%').")");
 			$url_string .= "&mailingstreet=".$mailingstreet;
 	}
 	if(isset($mailingcity) && $mailingcity != "") {
-			array_push($where_clauses, "(contactaddress.mailingcity ".$adb->getLike()." ".PearDatabase::quote($mailingcity.'%')." OR contactaddress.othercity ".$adb->getLike()." ".PearDatabase::quote($mailingcity.'%').")");
+			array_push($where_clauses, "(contactaddress.mailingcity ".$adb->getLike()." ".$adb->quote($mailingcity.'%')." OR contactaddress.othercity ".$adb->getLike()." ".$adb->quote($mailingcity.'%').")");
 			$url_string .= "&mailingcity=".$mailingcity;
 	}
 	if(isset($mailingstate) && $mailingstate != "") {
-			array_push($where_clauses, "(contactaddress.mailingstate ".$adb->getLike()." ".PearDatabase::quote($mailingstate.'%')." OR contactaddress.otherstate ".$adb->getLike()." ".PearDatabase::quote($mailingstate.'%').")");
+			array_push($where_clauses, "(contactaddress.mailingstate ".$adb->getLike()." ".$adb->quote($mailingstate.'%')." OR contactaddress.otherstate ".$adb->getLike()." ".$adb->quote($mailingstate.'%').")");
 			$url_string .= "&mailingstate=".$mailingstate;
 	}
 	if(isset($mailingzip) && $mailingzip != "") {
-			array_push($where_clauses, "(contactaddress.mailingzip ".$adb->getLike()." ".PearDatabase::quote($mailingzip.'%')." OR contactaddress.otherzip ".$adb->getLike()." ".PearDatabase::quote($mailingzip.'%').")");
+			array_push($where_clauses, "(contactaddress.mailingzip ".$adb->getLike()." ".$adb->quote($mailingzip.'%')." OR contactaddress.otherzip ".$adb->getLike()." ".$adb->quote($mailingzip.'%').")");
 			$url_string .= "&mailingzip=".$mailingzip;
 	}
 	if(isset($mailingcountry) && $mailingcountry != "") {
-			array_push($where_clauses, "(contactaddress.mailingcountry ".$adb->getLike()." ".PearDatabase::quote($mailingcountry.'%')." OR contactaddress.othercountry ".$adb->getLike()." ".PearDatabase::quote($mailingcountry.'%').")");
+			array_push($where_clauses, "(contactaddress.mailingcountry ".$adb->getLike()." ".$adb->quote($mailingcountry.'%')." OR contactaddress.othercountry ".$adb->getLike()." ".$adb->quote($mailingcountry.'%').")");
 			$url_string .= "&mailingcountry=".$mailingcountry;
 	}
 	if(isset($current_user_only) && $current_user_only != "") {
@@ -183,7 +183,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= "".PearDatabase::quote($val)."";
+			$where .= "".$adb->quote($val)."";
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 			// ACIPIA - to allow prev/next button to use criterias
 		        $url_string .= '&' . urlencode( 'assigned_user_id[]' ) . '=' . $val ;

Modified: vtigercrm/branches/4.2/modules/Contacts/Popup.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Contacts/Popup.php (original)
+++ vtigercrm/branches/4.2/modules/Contacts/Popup.php Mon Jun 12 14:04:34 2006
@@ -86,15 +86,15 @@
 	$where_clauses = Array();
 
 	if(isset($lastname) && $lastname != "") {
-			array_push($where_clauses, "contactdetails.lastname ".$adb->getLike()." ".PearDatabase::quote($lastname.'%')."");
+			array_push($where_clauses, "contactdetails.lastname ".$adb->getLike()." ".$adb->quote($lastname.'%')."");
 			$url_string .= "&lastname=".$lastname;
 	}
 	if(isset($firstname) && $firstname != "") {
-			array_push($where_clauses, "contactdetails.firstname ".$adb->getLike()." ".PearDatabase::quote($firstname.'%')."");
+			array_push($where_clauses, "contactdetails.firstname ".$adb->getLike()." ".$adb->quote($firstname.'%')."");
 			$url_string .= "&firstname=".$firstname;
 	}
 	if(isset($title) && $title != "")	{
-			array_push($where_clauses, "contactdetails.title ".$adb->getLike()." ".PearDatabase::quote("%".$title.'%')."");
+			array_push($where_clauses, "contactdetails.title ".$adb->getLike()." ".$adb->quote("%".$title.'%')."");
 			$url_string .= "&title=".$title;
 	}
 	if(isset($current_user_only) && $current_user_only != "") {

Modified: vtigercrm/branches/4.2/modules/CustomView/CustomView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/CustomView/CustomView.php (original)
+++ vtigercrm/branches/4.2/modules/CustomView/CustomView.php Mon Jun 12 14:04:34 2006
@@ -821,7 +821,7 @@
 		{
 			if(trim($value) != "")
                         {
-                                $rtvalue = " = ".PearDatabase::quote($value);
+                                $rtvalue = " = ".$adb->quote($value);
                         }else
                         {
                                 $rtvalue = " is NULL";
@@ -831,7 +831,7 @@
 		{
 			if(trim($value) != "")
                         {
-                                $rtvalue = " <> ".PearDatabase::quote($value);
+                                $rtvalue = " <> ".$adb->quote($value);
                         }else
                         {
                                 $rtvalue = "is NOT NULL";
@@ -839,31 +839,31 @@
 		}
 		if($comparator == "s")
 		{
-			$rtvalue = " ".$adb->getLike()." ".PearDatabase::quote($value."%");
+			$rtvalue = " ".$adb->getLike()." ".$adb->quote($value."%");
 		}
 		if($comparator == "c")
 		{
-			$rtvalue = " ".$adb->getLike()." ".PearDatabase::quote("%".$value."%");
+			$rtvalue = " ".$adb->getLike()." ".$adb->quote("%".$value."%");
 		}
 		if($comparator == "k")
 		{
-			$rtvalue = " not ".$adb->getLike()." ".PearDatabase::quote("%".$value."%");
+			$rtvalue = " not ".$adb->getLike()." ".$adb->quote("%".$value."%");
 		}
 		if($comparator == "l")
 		{
-			$rtvalue = " < ".PearDatabase::quote($value);
+			$rtvalue = " < ".$adb->quote($value);
 		}
 		if($comparator == "g")
 		{
-			$rtvalue = " > ".PearDatabase::quote($value);
+			$rtvalue = " > ".$adb->quote($value);
 		}
 		if($comparator == "m")
 		{
-			$rtvalue = " <= ".PearDatabase::quote($value);
+			$rtvalue = " <= ".$adb->quote($value);
 		}
 		if($comparator == "h")
 		{
-			$rtvalue = " >= ".PearDatabase::quote($value);
+			$rtvalue = " >= ".$adb->quote($value);
 		}
 		
 		return $rtvalue;

Modified: vtigercrm/branches/4.2/modules/Emails/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Emails/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Emails/ListView.php Mon Jun 12 14:04:34 2006
@@ -219,19 +219,19 @@
 	}
 	if(isset($name) && $name != '')
 	{
-		array_push($where_clauses, "activity.subject ".$adb->getLike()." ".PearDatabase::quote($name.'%')."");
+		array_push($where_clauses, "activity.subject ".$adb->getLike()." ".$adb->quote($name.'%')."");
 		$url_string .= "&subject=".$name;
 
 	}
 	if(isset($contactname) && $contactname != '')
 	{
-		array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()." ".PearDatabase::quote($contactname.'%')." OR contactdetails.lastname ".$adb->getLike()." ".PearDatabase::quote($contactname.'%').")");
+		array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()." ".$adb->quote($contactname.'%')." OR contactdetails.lastname ".$adb->getLike()." ".$adb->quote($contactname.'%').")");
 		$url_string .= "&contactname=".$contactname;
 
 	}
 	if(isset($date_start) && $date_start != '')
 	{
-		array_push($where_clauses, "events.eventdatestart ".$adb->getLike()." ".PearDatabase::quote($date_start.'%')."");
+		array_push($where_clauses, "events.eventdatestart ".$adb->getLike()." ".$adb->quote($date_start.'%')."");
 	}
 	if(isset($location) && $location != '')
 	{
@@ -241,7 +241,7 @@
 		$val = reset($each_location);
 		do
 		{
-			$the_where_clause .= "location = ".PearDatabase::quote($val)."";
+			$the_where_clause .= "location = ".$adb->quote($val)."";
 			$val = next($each_location);
 			if ($val) $the_where_clause .= " OR ";
 		} while($val);

Modified: vtigercrm/branches/4.2/modules/HelpDesk/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/HelpDesk/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/HelpDesk/ListView.php Mon Jun 12 14:04:34 2006
@@ -95,7 +95,7 @@
 	}
 	if(isset($contact_name) && $contact_name != "")
 	{
-		array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()."".PearDatabase::quote($contact_name.'%')." OR contactdetails.lastname ".$adb->getLike()." ".PearDatabase::quote($contact_name.'%').")");
+		array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()."".$adb->quote($contact_name.'%')." OR contactdetails.lastname ".$adb->getLike()." ".$adb->quote($contact_name.'%').")");
 		$url_string .= "&contact_name=".$contact_name;
 
 	}

Modified: vtigercrm/branches/4.2/modules/Invoice/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Invoice/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Invoice/ListView.php Mon Jun 12 14:04:34 2006
@@ -82,12 +82,12 @@
 	
 	if(isset($subject) && $subject != "") 
 	{
-		array_push($where_clauses, "invoice.subject ".$adb->getLike()." ".PearDatabase::quote($subject."%"));
+		array_push($where_clauses, "invoice.subject ".$adb->getLike()." ".$adb->quote($subject."%"));
 		$url_string .= "&subject=".$subject;
 	}
 	if(isset($salesorder) && $salesorder != "")
 	{
-		array_push($where_clauses, "salesorder.subject ".$adb->getLike()." ".PearDatabase::quote("%".$salesorder."%"));
+		array_push($where_clauses, "salesorder.subject ".$adb->getLike()." ".$adb->quote("%".$salesorder."%"));
 		$url_string .= "&salesorder=".$salesorder;
 	}
 	
@@ -105,7 +105,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= PearDatabase::quote($val);
+			$where .= $adb->quote($val);
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 		}
 	}

Modified: vtigercrm/branches/4.2/modules/Notes/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Notes/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Notes/ListView.php Mon Jun 12 14:04:34 2006
@@ -106,14 +106,14 @@
 
 	if(isset($name) && $name != '')
 	{
-		array_push($where_clauses, "notes.title ".$adb->getLike()." ".PearDatabase::quote($name.'%')."");
+		array_push($where_clauses, "notes.title ".$adb->getLike()." ".$adb->quote($name.'%')."");
 		$url_string .= "&title=".$name;
 	}
 	if(isset($contact_name) && $contact_name != '')
 	{
 		$contact_names = explode(" ", $contact_name);
 		foreach ($contact_names as $name) {
-			array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()." ".PearDatabase::quote($name.'%')." OR contactdetails.lastname ".$adb->getLike()." ".PearDatabase::quote($name.'%').")");
+			array_push($where_clauses, "(contactdetails.firstname ".$adb->getLike()." ".$adb->quote($name.'%')." OR contactdetails.lastname ".$adb->getLike()." ".$adb->quote($name.'%').")");
 		}
 		$url_string .= "&contact_name=".$contact_name;
 	}

Modified: vtigercrm/branches/4.2/modules/Orders/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Orders/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Orders/ListView.php Mon Jun 12 14:04:34 2006
@@ -83,17 +83,17 @@
 	
 	if(isset($subject) && $subject != "") 
 	{
-		array_push($where_clauses, "purchaseorder.subject ".$adb->getLike()." ".PearDatabase::quote($subject."%"));
+		array_push($where_clauses, "purchaseorder.subject ".$adb->getLike()." ".$adb->quote($subject."%"));
 		$url_string .= "&subject=".$subject;
 	}
 	if(isset($vendorname) && $vendorname != "")
 	{
-		array_push($where_clauses, "vendor.vendorname ".$adb->getLike()." ".PearDatabase::quote("%".$vendorname."%"));
+		array_push($where_clauses, "vendor.vendorname ".$adb->getLike()." ".$adb->quote("%".$vendorname."%"));
 		$url_string .= "&vendorname=".$vendorname;
 	}
 	if(isset($trackingno) && $trackingno != "")
 	{
-		array_push($where_clauses, "purchaseorder.tracking_no ".$adb->getLike()." ".PearDatabase::quote("%".$trackingno."%"));
+		array_push($where_clauses, "purchaseorder.tracking_no ".$adb->getLike()." ".$adb->quote("%".$trackingno."%"));
 		$url_string .= "&trackingno=".$trackingno;
 	}
 	
@@ -111,7 +111,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= PearDatabase::quote($val);
+			$where .= $adb->quote($val);
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 		}
 	}

Modified: vtigercrm/branches/4.2/modules/Orders/PopupSalesOrder.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Orders/PopupSalesOrder.php (original)
+++ vtigercrm/branches/4.2/modules/Orders/PopupSalesOrder.php Mon Jun 12 14:04:34 2006
@@ -61,21 +61,21 @@
 
 	if (isset($subject) && $subject !='')
 	{
-		array_push($where_clauses, "salesorder.subject ".$adb->getLike()." ".PearDatabase::quote($subject.'%'));
+		array_push($where_clauses, "salesorder.subject ".$adb->getLike()." ".$adb->quote($subject.'%'));
 		//$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
 		$url_string .= "&subject=".$subject;
 	}
 	
 	if (isset($accountname) && $accountname !='')
 	{
-		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote($accountname.'%'));
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote($accountname.'%'));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&accountname=".$accountname;
 	}
 
 	if (isset($quotename) && $quotename !='')
 	{
-		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".PearDatabase::quote($quotename.'%'));
+		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".$adb->quote($quotename.'%'));
 		 //$search_query .= " and commissionrate ".$adb->getLike()." '".$commissionrate."%'";
 		 $url_string .= "&quotename=".$quotename;
 	}

Modified: vtigercrm/branches/4.2/modules/Orders/SalesOrderListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Orders/SalesOrderListView.php (original)
+++ vtigercrm/branches/4.2/modules/Orders/SalesOrderListView.php Mon Jun 12 14:04:34 2006
@@ -83,21 +83,21 @@
 
 	if (isset($subject) && $subject !='')
 	{
-		array_push($where_clauses, "salesorder.subject ".$adb->getLike()." ".PearDatabase::quote($subject.'%'));
+		array_push($where_clauses, "salesorder.subject ".$adb->getLike()." ".$adb->quote($subject.'%'));
 		//$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
 		$url_string .= "&subject=".$subject;
 	}
 	
 	if (isset($accountname) && $accountname !='')
 	{
-		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote($accountname.'%'));
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote($accountname.'%'));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&accountname=".$accountname;
 	}
 
 	if (isset($quotename) && $quotename !='')
 	{
-		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".PearDatabase::quote($quotename.'%'));
+		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".$adb->quote($quotename.'%'));
 		 //$search_query .= " and commissionrate ".$adb->getLike()." '".$commissionrate."%'";
 		 $url_string .= "&quotename=".$quotename;
 	}

Modified: vtigercrm/branches/4.2/modules/Potentials/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Potentials/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Potentials/ListView.php Mon Jun 12 14:04:34 2006
@@ -93,46 +93,46 @@
 //upto this added for Custom Field
 
 	if(isset($name) && $name != "") {
-			array_push($where_clauses, "potential.potentialname ".$adb->getLike()." ".PearDatabase::quote($name.'%')."");
+		array_push($where_clauses, "potential.potentialname ".$adb->getLike()." ".$adb->quote($name.'%')."");
 			$url_string .= "&potentialname=".$name;
 	}
 	if(isset($accountname) && $accountname != "") {
-			array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote($accountname.'%')."");
-			$url_string .= "&accountname=".$accountname;
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote($accountname.'%')."");
+		$url_string .= "&accountname=".$accountname;
 
 
 	}
 	if(isset($lead_source) && $lead_source == "None") {
-			array_push($where_clauses, "potential.leadsource = ".PearDatabase::quote($lead_source)."");
-			$url_string .= "&leadsource=".$lead_source;
+		array_push($where_clauses, "potential.leadsource = ".$adb->quote($lead_source)."");
+		$url_string .= "&leadsource=".$lead_source;
 	}
 	// added to handle request from dashboard GS
 	if(isset($lead_source) && $lead_source != "") {
-			array_push($where_clauses, "potential.leadsource = ".PearDatabase::quote($lead_source)."");
-			$url_string .= "&leadsource=".$lead_source;
+		array_push($where_clauses, "potential.leadsource = ".$adb->quote($lead_source)."");
+		$url_string .= "&leadsource=".$lead_source;
 	}
 	if(isset($opportunity_type) && $opportunity_type != "") {
-			array_push($where_clauses, "potential.potentialtype = ".PearDatabase::quote($opportunity_type)."");
-			$url_string .= "&opportunity_type=".$opportunity_type;
+		array_push($where_clauses, "potential.potentialtype = ".$adb->quote($opportunity_type)."");
+		$url_string .= "&opportunity_type=".$opportunity_type;
 	}
 	if(isset($amount) && $amount != "") {
-			array_push($where_clauses, "potential.amount ".$adb->getLike()." ".PearDatabase::quote($amount.'%')."");
-			$url_string .= "&amount=".$amount;
+		array_push($where_clauses, "potential.amount ".$adb->getLike()." ".$adb->quote($amount.'%')."");
+		$url_string .= "&amount=".$amount;
 	}
 	if(isset($nextstep) && $nextstep != "") {
-			array_push($where_clauses, "potential.nextstep ".$adb->getLike()." ".PearDatabase::quote($nextstep.'%')."");
-			$url_string .= "&nextstep=".$nextstep;
+		array_push($where_clauses, "potential.nextstep ".$adb->getLike()." ".$adb->quote($nextstep.'%')."");
+		$url_string .= "&nextstep=".$nextstep;
 	}
 	if(isset($sales_stage) && $sales_stage != "") {
 			if($sales_stage=='Other')
 				array_push($where_clauses, "(potential.sales_stage <> 'Closed Won' and potential.sales_stage <> 'Closed Lost')");
 			else
-				array_push($where_clauses, "potential.sales_stage = ".PearDatabase::quote($sales_stage));
+				array_push($where_clauses, "potential.sales_stage = ".$adb->quote($sales_stage));
 			$url_string .= "&sales_stage=".$sales_stage;
 	}
 	if(isset($probability) && $probability != "") {
-			array_push($where_clauses, "potential.probability ".$adb->getLike()." ".PearDatabase::quote($probability.'%')."");
-			$url_string .= "&probability=".$probability;
+		array_push($where_clauses, "potential.probability ".$adb->getLike()." ".$adb->quote($probability.'%')."");
+		$url_string .= "&probability=".$probability;
 
 	}
 	if(isset($current_user_only) && $current_user_only != "") {
@@ -140,13 +140,13 @@
 			$url_string .= "&current_user_only=".$current_user_only;
 	}
 	if(isset($date_closed) && $date_closed != "") {
-			array_push($where_clauses, $adb->getDBDateString("potential.closingdate")." ".$adb->getLike()." ".PearDatabase::quote($date_closed.'%')."");
-			$url_string .= "&closingdate=".$date_closed;
+		array_push($where_clauses, $adb->getDBDateString("potential.closingdate")." ".$adb->getLike()." ".$adb->quote($date_closed.'%')."");
+		$url_string .= "&closingdate=".$date_closed;
 	}
 	if(isset($date_closed_start) && $date_closed_start != "" && isset($date_closed_end) && $date_closed_end != "")
 	{
-			array_push($where_clauses, "potential.closingdate >= ".PearDatabase::quote($date_closed_start)." and potential.closingdate <= ".PearDatabase::quote($date_closed_end));
-			$url_string .= "&closingdate_start=".$date_closed_start;
+		array_push($where_clauses, "potential.closingdate >= ".$adb->quote($date_closed_start)." and potential.closingdate <= ".$adb->quote($date_closed_end));
+		$url_string .= "&closingdate_start=".$date_closed_start;
 	}
 
 	$where = "";
@@ -163,7 +163,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= "".PearDatabase::quote($val)."";
+			$where .= "".$adb->quote($val)."";
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 			// ACIPIA - to allow prev/next button to use criterias
 			$url_string .= '&' . urlencode( 'assigned_user_id[]' ) . '=' . $val ;

Modified: vtigercrm/branches/4.2/modules/Potentials/Popup.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Potentials/Popup.php (original)
+++ vtigercrm/branches/4.2/modules/Potentials/Popup.php Mon Jun 12 14:04:34 2006
@@ -73,12 +73,12 @@
 	$where_clauses = array();
 
 	if(isset($name) && $name != "") {
-			array_push($where_clauses, "potential.potentialname ".$adb->getLike()." ".PearDatabase::quote($name.'%')."");
-			$url_string .= "&name=".$name;		
+		array_push($where_clauses, "potential.potentialname ".$adb->getLike()." ".$adb->quote($name.'%')."");
+		$url_string .= "&name=".$name;		
 	}
 	if(isset($accountname) && $accountname != "") {
-			array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote('%'.$accountname.'%')."");
-			$url_string .= "&account_name=".$accountname;		
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote('%'.$accountname.'%')."");
+		$url_string .= "&account_name=".$accountname;		
 	}
 	if(isset($current_user_only) && $current_user_only != "") {
 			array_push($where_clauses, "crmentity.smcreator='$current_user->id'");
@@ -101,7 +101,7 @@
 		}
 		$where .= "crmentity.smcreatorid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= "".PearDatabase::quote($val)."";
+			$where .= "".$adb->quote($val)."";
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 		}
 	}

Modified: vtigercrm/branches/4.2/modules/Products/AddProductsToPriceBook.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/AddProductsToPriceBook.php (original)
+++ vtigercrm/branches/4.2/modules/Products/AddProductsToPriceBook.php Mon Jun 12 14:04:34 2006
@@ -96,65 +96,65 @@
 
 	if (isset($productname) && $productname !='')
 	{
-		array_push($where_clauses, "productname ".$adb->getLike()." ".PearDatabase::quote($productname.'%'));
+		array_push($where_clauses, "productname ".$adb->getLike()." ".$adb->quote($productname.'%'));
 		//$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
 		$url_string .= "&productname=".$productname;
 	}
 	
 	if (isset($productcode) && $productcode !='')
 	{
-		array_push($where_clauses, "productcode ".$adb->getLike()." ".PearDatabase::quote($productcode.'%'));
+		array_push($where_clauses, "productcode ".$adb->getLike()." ".$adb->quote($productcode.'%'));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&productcode=".$productcode;
 	}
 
 	if (isset($commissionrate) && $commissionrate !='')
 	{
-		array_push($where_clauses, "commissionrate ".$adb->getLike()." ".PearDatabase::quote($commissionrate.'%'));
+		array_push($where_clauses, "commissionrate ".$adb->getLike()." ".$adb->quote($commissionrate.'%'));
 		 //$search_query .= " and commissionrate ".$adb->getLike()." '".$commissionrate."%'";
 		 $url_string .= "&commissionrate=".$commissionrate;
 	}
 	
 	if (isset($qtyperunit) && $qtyperunit !='')
 	{
-		array_push($where_clauses, "qty_per_unit ".$adb->getLike()." ".PearDatabase::quote($qtyperunit.'%'));
+		array_push($where_clauses, "qty_per_unit ".$adb->getLike()." ".$adb->quote($qtyperunit.'%'));
 	 	//$search_query .= " and qty_per_unit ".$adb->getLike()." '".$qtyperunit."%'";
 		$url_string .= "&qtyperunit=".$qtyperunit;
 	}
 	
 	if (isset($unitprice) && $unitprice !='')
 	{
-		array_push($where_clauses, "unit_price ".$adb->getLike()." ".PearDatabase::quote($unitprice.'%'));
+		array_push($where_clauses, "unit_price ".$adb->getLike()." ".$adb->quote($unitprice.'%'));
 	 //	$search_query .= " and unit_price ".$adb->getLike()." '".$unitprice."%'";
 		$url_string .= "&unitprice=".$unitprice;
 	}
 	if (isset($manufacturer) && $manufacturer !='' && $manufacturer !='--None--')
         {
-		array_push($where_clauses, "manufacturer ".$adb->getLike()." ".PearDatabase::quote($manufacturer.'%'));
+		array_push($where_clauses, "manufacturer ".$adb->getLike()." ".$adb->quote($manufacturer.'%'));
         	//$search_query .= " and manufacturer ".$adb->getLike()." '".$manufacturer."%'";
                 $url_string .= "&manufacturer=".$manufacturer;
 	}
 	if (isset($productcategory) && $productcategory !='' && $productcategory !='--None--')
         {
-		array_push($where_clauses, "productcategory ".$adb->getLike()." ".PearDatabase::quote($productcategory.'%'));
+		array_push($where_clauses, "productcategory ".$adb->getLike()." ".$adb->quote($productcategory.'%'));
         	//$search_query .= " and productcategory ".$adb->getLike()." '".$productcategory."%'";
                 $url_string .= "&productcategory=".$productcategory;
 	}
 	if (isset($start_date) && $start_date !='')
         {
-		array_push($where_clauses, "start_date ".$adb->getLike()." ".PearDatabase::quote($start_date.'%'));
+		array_push($where_clauses, "start_date ".$adb->getLike()." ".$adb->quote($start_date.'%'));
                 //$search_query .= " and start_date = '".$start_date."%'";
                 $url_string .= "&start_date=".$start_date;
         } 
 	if (isset($expiry_date) && $expiry_date !='')
         {
-		array_push($where_clauses, "expiry_date ".$adb->getLike()." ".PearDatabase::quote($expiry_date.'%'));
+		array_push($where_clauses, "expiry_date ".$adb->getLike()." ".$adb->quote($expiry_date.'%'));
                 //$search_query .= " and expiry_date = '".$expiry_date."%'";
                 $url_string .= "&expiry_date=".$expiry_date;
         } 
 	if (isset($purchase_date) && $purchase_date !='')
         {
-		array_push($where_clauses, "purchase_date ".$adb->getLike()." ".PearDatabase::quote($purchase_date.'%'));
+		array_push($where_clauses, "purchase_date ".$adb->getLike()." ".$adb->quote($purchase_date.'%'));
                 //$search_query .= " and purchase_date = '".$purchase_date."%'";
                 $url_string .= "&purchase_date=".$purchase_date;
         }

Modified: vtigercrm/branches/4.2/modules/Products/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Products/ListView.php Mon Jun 12 14:04:34 2006
@@ -90,65 +90,65 @@
 
 	if (isset($productname) && $productname !='')
 	{
-		array_push($where_clauses, "productname ".$adb->getLike()." ".PearDatabase::quote($productname.'%'));
+		array_push($where_clauses, "productname ".$adb->getLike()." ".$adb->quote($productname.'%'));
 		//$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
 		$url_string .= "&productname=".$productname;
 	}
 	
 	if (isset($productcode) && $productcode !='')
 	{
-		array_push($where_clauses, "productcode ".$adb->getLike()." ".PearDatabase::quote($productcode.'%'));
+		array_push($where_clauses, "productcode ".$adb->getLike()." ".$adb->quote($productcode.'%'));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&productcode=".$productcode;
 	}
 
 	if (isset($commissionrate) && $commissionrate !='')
 	{
-		array_push($where_clauses, "commissionrate ".$adb->getLike()." ".PearDatabase::quote($commissionrate.'%'));
+		array_push($where_clauses, "commissionrate ".$adb->getLike()." ".$adb->quote($commissionrate.'%'));
 		 //$search_query .= " and commissionrate ".$adb->getLike()." '".$commissionrate."%'";
 		 $url_string .= "&commissionrate=".$commissionrate;
 	}
 	
 	if (isset($qtyperunit) && $qtyperunit !='')
 	{
-		array_push($where_clauses, "qty_per_unit ".$adb->getLike()." ".PearDatabase::quote($qtyperunit.'%'));
+		array_push($where_clauses, "qty_per_unit ".$adb->getLike()." ".$adb->quote($qtyperunit.'%'));
 	 	//$search_query .= " and qty_per_unit ".$adb->getLike()." '".$qtyperunit."%'";
 		$url_string .= "&qtyperunit=".$qtyperunit;
 	}
 	
 	if (isset($unitprice) && $unitprice !='')
 	{
-		array_push($where_clauses, "unit_price ".$adb->getLike()." ".PearDatabase::quote($unitprice.'%'));
+		array_push($where_clauses, "unit_price ".$adb->getLike()." ".$adb->quote($unitprice.'%'));
 	 //	$search_query .= " and unit_price ".$adb->getLike()." '".$unitprice."%'";
 		$url_string .= "&unitprice=".$unitprice;
 	}
 	if (isset($manufacturer) && $manufacturer !='' && $manufacturer !='--None--')
         {
-		array_push($where_clauses, "manufacturer ".$adb->getLike()." ".PearDatabase::quote($manufacturer.'%'));
+		array_push($where_clauses, "manufacturer ".$adb->getLike()." ".$adb->quote($manufacturer.'%'));
         	//$search_query .= " and manufacturer ".$adb->getLike()." '".$manufacturer."%'";
                 $url_string .= "&manufacturer=".$manufacturer;
 	}
 	if (isset($productcategory) && $productcategory !='' && $productcategory !='--None--')
         {
-		array_push($where_clauses, "productcategory ".$adb->getLike()." ".PearDatabase::quote($productcategory.'%'));
+		array_push($where_clauses, "productcategory ".$adb->getLike()." ".$adb->quote($productcategory.'%'));
         	//$search_query .= " and productcategory ".$adb->getLike()." '".$productcategory."%'";
                 $url_string .= "&productcategory=".$productcategory;
 	}
 	if (isset($start_date) && $start_date !='')
         {
-		array_push($where_clauses, "start_date ".$adb->getLike()." ".PearDatabase::quote($start_date.'%'));
+		array_push($where_clauses, "start_date ".$adb->getLike()." ".$adb->quote($start_date.'%'));
                 //$search_query .= " and start_date = '".$start_date."%'";
                 $url_string .= "&start_date=".$start_date;
         } 
 	if (isset($expiry_date) && $expiry_date !='')
         {
-		array_push($where_clauses, "expiry_date ".$adb->getLike()." ".PearDatabase::quote($expiry_date.'%'));
+		array_push($where_clauses, "expiry_date ".$adb->getLike()." ".$adb->quote($expiry_date.'%'));
                 //$search_query .= " and expiry_date = '".$expiry_date."%'";
                 $url_string .= "&expiry_date=".$expiry_date;
         } 
 	if (isset($purchase_date) && $purchase_date !='')
         {
-		array_push($where_clauses, "purchase_date ".$adb->getLike()." ".PearDatabase::quote($purchase_date.'%'));
+		array_push($where_clauses, "purchase_date ".$adb->getLike()." ".$adb->quote($purchase_date.'%'));
                 //$search_query .= " and purchase_date = '".$purchase_date."%'";
                 $url_string .= "&purchase_date=".$purchase_date;
         }

Modified: vtigercrm/branches/4.2/modules/Products/PriceBookListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/PriceBookListView.php (original)
+++ vtigercrm/branches/4.2/modules/Products/PriceBookListView.php Mon Jun 12 14:04:34 2006
@@ -84,7 +84,7 @@
 
 	if (isset($bookname) && $bookname !='')
 	{
-		array_push($where_clauses, "bookname ".$adb->getLike()." ".PearDatabase::quote($bookname.'%'));
+		array_push($where_clauses, "bookname ".$adb->getLike()." ".$adb->quote($bookname.'%'));
 		//$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
 		$url_string .= "&bookname=".$bookname;
 	}

Modified: vtigercrm/branches/4.2/modules/Products/PriceBookPopup.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/PriceBookPopup.php (original)
+++ vtigercrm/branches/4.2/modules/Products/PriceBookPopup.php Mon Jun 12 14:04:34 2006
@@ -54,202 +54,6 @@
 $sorder = 'ASC';  // Default sort order
 if(isset($_REQUEST['sorder']) && $_REQUEST['sorder'] != '')
 $sorder = $_REQUEST['sorder'];
-/*
-if(isset($_REQUEST['query']) && $_REQUEST['query'] != '' && $_REQUEST['query'] == 'true')
-{
-	$url_string .="&query=true";
-	if (isset($_REQUEST['productname'])) $productname = $_REQUEST['productname'];
-        if (isset($_REQUEST['productcode'])) $productcode = $_REQUEST['productcode'];
-        if (isset($_REQUEST['commissionrate'])) $commissionrate = $_REQUEST['commissionrate'];
-	if (isset($_REQUEST['qtyperunit'])) $qtyperunit = $_REQUEST['qtyperunit'];
-        if (isset($_REQUEST['unitprice'])) $unitprice = $_REQUEST['unitprice'];
-        if (isset($_REQUEST['manufacturer'])) $manufacturer = $_REQUEST['manufacturer'];
-        if (isset($_REQUEST['productcategory'])) $productcategory = $_REQUEST['productcategory'];
-	if (isset($_REQUEST['start_date'])) $start_date = $_REQUEST['start_date'];
-        if (isset($_REQUEST['expiry_date'])) $expiry_date = $_REQUEST['expiry_date'];
-        if (isset($_REQUEST['purchase_date'])) $purchase_date = $_REQUEST['purchase_date'];
-
-	$where_clauses = Array();
-	//$search_query='';
-
-	//Added for Custom Field Search
-	$sql="select * from field where tablename='productcf' order by fieldlabel";
-	$result=$adb->query($sql);
-	for($i=0;$i<$adb->num_rows($result);$i++)
-	{
-	        $column[$i]=$adb->query_result($result,$i,'columnname');
-	        $fieldlabel[$i]=$adb->query_result($result,$i,'fieldlabel');
-		$uitype[$i]=$adb->query_result($result,$i,'uitype');
-
-	        if (isset($_REQUEST[$column[$i]])) $customfield[$i] = $_REQUEST[$column[$i]];
-	
-	        if(isset($customfield[$i]) && $customfield[$i] != '')
-	        {
-			if($uitype[$i] == 56)
-                                $str=" productcf.".$column[$i]." = 1";
-                        else
-			        $str=" productcf.".$column[$i]." like '$customfield[$i]%'";
-		        array_push($where_clauses, $str);
-	       	//	  $search_query .= ' and '.$str;
-			$url_string .="&".$column[$i]."=".$customfield[$i];
-	        }
-	}
-	//upto this added for Custom Field
-
-	if (isset($productname) && $productname !='')
-	{
-		array_push($where_clauses, "productname like ".PearDatabase::quote($productname.'%'));
-		//$search_query .= " and productname like '".$productname."%'";
-		$url_string .= "&productname=".$productname;
-	}
-	
-	if (isset($productcode) && $productcode !='')
-	{
-		array_push($where_clauses, "productcode like ".PearDatabase::quote($productcode.'%'));
-		//$search_query .= " and productcode like '".$productcode."%'";
-		$url_string .= "&productcode=".$productcode;
-	}
-
-	if (isset($commissionrate) && $commissionrate !='')
-	{
-		array_push($where_clauses, "commissionrate like ".PearDatabase::quote($commissionrate.'%'));
-		 //$search_query .= " and commissionrate like '".$commissionrate."%'";
-		 $url_string .= "&commissionrate=".$commissionrate;
-	}
-	
-	if (isset($qtyperunit) && $qtyperunit !='')
-	{
-		array_push($where_clauses, "qty_per_unit like ".PearDatabase::quote($qtyperunit.'%'));
-	 	//$search_query .= " and qty_per_unit like '".$qtyperunit."%'";
-		$url_string .= "&qtyperunit=".$qtyperunit;
-	}
-	
-	if (isset($unitprice) && $unitprice !='')
-	{
-		array_push($where_clauses, "unit_price like ".PearDatabase::quote($unitprice.'%'));
-	 //	$search_query .= " and unit_price like '".$unitprice."%'";
-		$url_string .= "&unitprice=".$unitprice;
-	}
-	if (isset($manufacturer) && $manufacturer !='' && $manufacturer !='--None--')
-        {
-		array_push($where_clauses, "manufacturer like ".PearDatabase::quote($manufacturer.'%'));
-        	//$search_query .= " and manufacturer like '".$manufacturer."%'";
-                $url_string .= "&manufacturer=".$manufacturer;
-	}
-	if (isset($productcategory) && $productcategory !='' && $productcategory !='--None--')
-        {
-		array_push($where_clauses, "productcategory like ".PearDatabase::quote($productcategory.'%'));
-        	//$search_query .= " and productcategory like '".$productcategory."%'";
-                $url_string .= "&productcategory=".$productcategory;
-	}
-	if (isset($start_date) && $start_date !='')
-        {
-		array_push($where_clauses, "start_date like ".PearDatabase::quote($start_date.'%'));
-                //$search_query .= " and start_date = '".$start_date."%'";
-                $url_string .= "&start_date=".$start_date;
-        } 
-	if (isset($expiry_date) && $expiry_date !='')
-        {
-		array_push($where_clauses, "expiry_date like ".PearDatabase::quote($expiry_date.'%'));
-                //$search_query .= " and expiry_date = '".$expiry_date."%'";
-                $url_string .= "&expiry_date=".$expiry_date;
-        } 
-	if (isset($purchase_date) && $purchase_date !='')
-        {
-		array_push($where_clauses, "purchase_date like ".PearDatabase::quote($purchase_date.'%'));
-                //$search_query .= " and purchase_date = '".$purchase_date."%'";
-                $url_string .= "&purchase_date=".$purchase_date;
-        }
-	$where = "";
-	foreach($where_clauses as $clause)
-	{
-		if($where != "")
-		$where .= " and ";
-		$where .= $clause;
-	}
-
-	$log->info("Here is the where clause for the list view: $where");
- 
-
-}
-
-//Constructing the Search Form
-if (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
-        // Stick the form header out there.
-	echo get_form_header($current_module_strings['LBL_SEARCH_FORM_TITLE'],'', false);
-        $search_form=new XTemplate ('modules/Products/PopupSearchForm.html');
-        $search_form->assign("MOD", $mod_strings);
-        $search_form->assign("APP", $app_strings);
-	$clearsearch = 'true';
-	
-	if ($order_by !='') $search_form->assign("ORDER_BY", $order_by);
-	if ($sorder !='') $search_form->assign("SORDER", $sorder);
-	$search_form->assign("JAVASCRIPT", get_clear_form_js());
-	if($order_by != '') {
-		$ordby = "&order_by=".$order_by;
-	}
-	else
-	{
-		$ordby ='';
-	}
-	$search_form->assign("BASIC_LINK", "index.php?module=Products".$ordby."&action=index".$url_string."&sorder=".$sorder);
-	$search_form->assign("ADVANCE_LINK", "index.php?module=Products&action=index".$ordby."&advanced=true".$url_string."&sorder=".$sorder);
-
-	if ($productname !='') $search_form->assign("PRODUCT_NAME", $productname);
-	if ($commissionrate !='') $search_form->assign("COMMISSION_RATE", $commissionrate);
-	if ($productcode !='') $search_form->assign("PRODUCT_CODE", $productcode);
-	if ($qtyperunit !='') $search_form->assign("QTYPERUNIT", $qtyperunit);
-	if ($unitprice !='') $search_form->assign("UNITPRICE", $unitprice);
-	if (isset($_REQUEST['manufacturer'])) $manufacturer = $_REQUEST['manufacturer'];	
-	if (isset($_REQUEST['productcategory'])) $productcategoty = $_REQUEST['productcategory'];	
-	if (isset($_REQUEST['start_date'])) $start_date = $_REQUEST['start_date'];	
-	if (isset($_REQUEST['expiry_date'])) $expiry_date = $_REQUEST['expiry_date'];	
-	if (isset($_REQUEST['purchase_date'])) $purchase_date = $_REQUEST['purchase_date'];	
-
-//Combo Fields for Manufacturer and Category are moved from advanced to Basic Search
-/*        if (isset($manufacturer)) $search_form->assign("MANUFACTURER", get_select_options($comboFieldArray['manufacturer_dom'], $manufacturer, $clearsearch));
-        else $search_form->assign("MANUFACTURER", get_select_options($comboFieldArray['manufacturer_dom'], '', $clearsearch));
-        if (isset($productcategory)) $search_form->assign("PRODUCTCATEGORY", get_select_options($comboFieldArray['productcategory_dom'], $productcategoty, $clearsearch));
-        else $search_form->assign("PRODUCTCATEGORY", get_select_options($comboFieldArray['productcategory_dom'], '', $clearsearch));
-*/
- /*       if (isset($_REQUEST['advanced']) && $_REQUEST['advanced'] == 'true') 
-	{
-		$url_string .="&advanced=true";
-		$search_form->assign("ALPHABETICAL",AlphabeticalSearch('Products','index','productname','true','advanced'));
-
-		$search_form->assign("SUPPORT_START_DATE",$_REQUEST['start_date']);
-		$search_form->assign("SUPPORT_EXPIRY_DATE",$_REQUEST['expiry_date']);
-		$search_form->assign("PURCHASE_DATE",$_REQUEST['purchase_date']);
-		$search_form->assign("DATE_FORMAT", $current_user->date_format);
-
-		//Added for Custom Field Search
-		$sql="select * from field where tablename='productcf' order by fieldlabel";
-		$result=$adb->query($sql);
-		for($i=0;$i<$adb->num_rows($result);$i++)
-		{
-		        $column[$i]=$adb->query_result($result,$i,'columnname');
-		        $fieldlabel[$i]=$adb->query_result($result,$i,'fieldlabel');
-		        if (isset($_REQUEST[$column[$i]])) $customfield[$i] = $_REQUEST[$column[$i]];
-		}
-		require_once('include/CustomFieldUtil.php');
-		$custfld = CustomFieldSearch($customfield, "productcf", "productcf", "productid", $app_strings,$theme,$column,$fieldlabel);
-		$search_form->assign("CUSTOMFIELD", $custfld);
-		//upto this added for Custom Field
-
-                $search_form->parse("advanced");
-                $search_form->out("advanced");
-	}
-	else
-	{        
-		$search_form->assign("ALPHABETICAL",AlphabeticalSearch('Products','index','productname','true','basic'));
-		$search_form->parse("main");
-	        $search_form->out("main");
-	}
-echo get_form_footer();
-//echo '<br><br>';
-
-}
-*/
 //Retreive the list from Database
 
 //$list_query = getListQuery("PriceBook");

Modified: vtigercrm/branches/4.2/modules/Products/VendorListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/VendorListView.php (original)
+++ vtigercrm/branches/4.2/modules/Products/VendorListView.php Mon Jun 12 14:04:34 2006
@@ -85,76 +85,25 @@
 
 	if (isset($vendorname) && $vendorname !='')
 	{
-		array_push($where_clauses, "vendorname ".$adb->getLike()." ".PearDatabase::quote($vendorname.'%'));
+		array_push($where_clauses, "vendorname ".$adb->getLike()." ".$adb->quote($vendorname.'%'));
 		//$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
 		$url_string .= "&vendorname=".$vendorname;
 	}
 
 	if (isset($email) && $email !='')
 	{
-		array_push($where_clauses, "email =".PearDatabase::quote($email));
+		array_push($where_clauses, "email =".$adb->quote($email));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&email=".$email;
 	}
 	
 	if (isset($category) && $category !='')
 	{
-		array_push($where_clauses, "category ".$adb->getLike()." ".PearDatabase::quote($category.'%'));
+		array_push($where_clauses, "category ".$adb->getLike()." ".$adb->quote($category.'%'));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&category=".$category;
 	}
 
-/*	if (isset($commissionrate) && $commissionrate !='')
-	{
-		array_push($where_clauses, "commissionrate ".$adb->getLike()." ".PearDatabase::quote($commissionrate.'%'));
-		 //$search_query .= " and commissionrate ".$adb->getLike()." '".$commissionrate."%'";
-		 $url_string .= "&commissionrate=".$commissionrate;
-	}
-
-	if (isset($qtyperunit) && $qtyperunit !='')
-	{
-		array_push($where_clauses, "qty_per_unit ".$adb->getLike()." ".PearDatabase::quote($qtyperunit.'%'));
-	 	//$search_query .= " and qty_per_unit ".$adb->getLike()." '".$qtyperunit."%'";
-		$url_string .= "&qtyperunit=".$qtyperunit;
-	}
-
-	if (isset($unitprice) && $unitprice !='')
-	{
-		array_push($where_clauses, "unit_price ".$adb->getLike()." ".PearDatabase::quote($unitprice.'%'));
-	 //	$search_query .= " and unit_price ".$adb->getLike()." '".$unitprice."%'";
-		$url_string .= "&unitprice=".$unitprice;
-	}
-	if (isset($manufacturer) && $manufacturer !='' && $manufacturer !='--None--')
-        {
-		array_push($where_clauses, "manufacturer ".$adb->getLike()." ".PearDatabase::quote($manufacturer.'%'));
-        	//$search_query .= " and manufacturer ".$adb->getLike()." '".$manufacturer."%'";
-                $url_string .= "&manufacturer=".$manufacturer;
-	}
-	if (isset($productcategory) && $productcategory !='' && $productcategory !='--None--')
-        {
-		array_push($where_clauses, "productcategory ".$adb->getLike()." ".PearDatabase::quote($productcategory.'%'));
-        	//$search_query .= " and productcategory ".$adb->getLike()." '".$productcategory."%'";
-                $url_string .= "&productcategory=".$productcategory;
-	}
-	if (isset($start_date) && $start_date !='')
-        {
-		array_push($where_clauses, "start_date ".$adb->getLike()." ".PearDatabase::quote($start_date.'%'));
-                //$search_query .= " and start_date = '".$start_date."%'";
-                $url_string .= "&start_date=".$start_date;
-        }
-	if (isset($expiry_date) && $expiry_date !='')
-        {
-		array_push($where_clauses, "expiry_date ".$adb->getLike()." ".PearDatabase::quote($expiry_date.'%'));
-                //$search_query .= " and expiry_date = '".$expiry_date."%'";
-                $url_string .= "&expiry_date=".$expiry_date;
-        }
-	if (isset($purchase_date) && $purchase_date !='')
-        {
-		array_push($where_clauses, "purchase_date ".$adb->getLike()." ".PearDatabase::quote($purchase_date.'%'));
-                //$search_query .= " and purchase_date = '".$purchase_date."%'";
-                $url_string .= "&purchase_date=".$purchase_date;
-        }
-*/
 	$where = "";
 	foreach($where_clauses as $clause)
 	{

Modified: vtigercrm/branches/4.2/modules/Products/VendorPopup.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/VendorPopup.php (original)
+++ vtigercrm/branches/4.2/modules/Products/VendorPopup.php Mon Jun 12 14:04:34 2006
@@ -91,21 +91,21 @@
 
 	if (isset($vendorname) && $vendorname !='')
 	{
-		array_push($where_clauses, "vendorname ".$adb->getLike()." ".PearDatabase::quote($vendorname.'%'));
+		array_push($where_clauses, "vendorname ".$adb->getLike()." ".$adb->quote($vendorname.'%'));
 		//$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
 		$url_string .= "&vendorname=".$vendorname;
 	}
 
 	if (isset($companyname) && $companyname !='')
 	{
-		array_push($where_clauses, "company_name ".$adb->getLike()." ".PearDatabase::quote($companyname.'%'));
+		array_push($where_clauses, "company_name ".$adb->getLike()." ".$adb->quote($companyname.'%'));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&companyname=".$companyname;
 	}
 	
 	if (isset($category) && $category !='')
 	{
-		array_push($where_clauses, "category ".$adb->getLike()." ".PearDatabase::quote($category.'%'));
+		array_push($where_clauses, "category ".$adb->getLike()." ".$adb->quote($category.'%'));
 		//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
 		$url_string .= "&category=".$category;
 	}

Modified: vtigercrm/branches/4.2/modules/Quotes/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Quotes/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Quotes/ListView.php Mon Jun 12 14:04:34 2006
@@ -83,23 +83,23 @@
 	
 	if(isset($subject) && $subject != "") 
 	{
-		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".PearDatabase::quote($subject."%"));
+		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".$adb->quote($subject."%"));
 		$url_string .= "&subject=".$subject;
 	}
 	if(isset($potentialname) && $potentialname != "")
 	{
-		array_push($where_clauses, "potential.potentialname ".$adb->getLike()." ".PearDatabase::quote("%".$potentialname."%"));
+		array_push($where_clauses, "potential.potentialname ".$adb->getLike()." ".$adb->quote("%".$potentialname."%"));
 		$url_string .= "&potentialname=".$potentialname;
 	}
 	if(isset($accountname) && $accountname != "")
 	{
-		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote("%".$accountname."%"));
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote("%".$accountname."%"));
 		$url_string .= "&accountname=".$accountname;
 	}
 
 	if(isset($quotestage) && $quotestage != "")
 	{
-		array_push($where_clauses, "quotes.quotestage ".$adb->getLike()." ".PearDatabase::quote("%".$quotestage."%"));
+		array_push($where_clauses, "quotes.quotestage ".$adb->getLike()." ".$adb->quote("%".$quotestage."%"));
 		$url_string .= "&quotestage=".$quotestage;
 	}
 	
@@ -117,7 +117,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= PearDatabase::quote($val);
+			$where .= $adb->quote($val);
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 		}
 	}

Modified: vtigercrm/branches/4.2/modules/Quotes/Popup.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Quotes/Popup.php (original)
+++ vtigercrm/branches/4.2/modules/Quotes/Popup.php Mon Jun 12 14:04:34 2006
@@ -97,18 +97,18 @@
 	
 	if(isset($subject) && $subject != "") 
 	{
-		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".PearDatabase::quote($subject."%"));
+		array_push($where_clauses, "quotes.subject ".$adb->getLike()." ".$adb->quote($subject."%"));
 		$url_string .= "&subject=".$subject;
 	}
 	if(isset($accountname) && $accountname != "")
 	{
-		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".PearDatabase::quote("%".$accountname."%"));
+		array_push($where_clauses, "account.accountname ".$adb->getLike()." ".$adb->quote("%".$accountname."%"));
 		$url_string .= "&accountname=".$accountname;
 	}
 
 	if(isset($quotestage) && $quotestage != "")
 	{
-		array_push($where_clauses, "quotes.quotestage ".$adb->getLike()." ".PearDatabase::quote("%".$quotestage."%"));
+		array_push($where_clauses, "quotes.quotestage ".$adb->getLike()." ".$adb->quote("%".$quotestage."%"));
 		$url_string .= "&quotestage=".$quotestage;
 	}
 	
@@ -126,7 +126,7 @@
 		}
 		$where .= "crmentity.smownerid IN(";
 		foreach ($assigned_user_id as $key => $val) {
-			$where .= PearDatabase::quote($val);
+			$where .= $adb->quote($val);
 			$where .= ($key == count($assigned_user_id) - 1) ? ")" : ", ";
 		}
 	}

Modified: vtigercrm/branches/4.2/modules/Reports/ReportRun.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Reports/ReportRun.php (original)
+++ vtigercrm/branches/4.2/modules/Reports/ReportRun.php Mon Jun 12 14:04:34 2006
@@ -181,7 +181,7 @@
                 {
                         if(trim($value) != "")
 			{
-				$rtvalue = " = ".PearDatabase::quote($value);
+				$rtvalue = " = ".$adb->quote($value);
 			}else
 			{
 				$rtvalue = " is NULL";
@@ -191,7 +191,7 @@
                 {
                         if(trim($value) != "")
 			{
-				$rtvalue = " <> ".PearDatabase::quote($value);
+				$rtvalue = " <> ".$adb->quote($value);
 			}else
 			{
 				$rtvalue = " is NOT NULL";
@@ -199,31 +199,31 @@
                 }
                 if($comparator == "s")
                 {
-                        $rtvalue = " ".$adb->getLike()." ".PearDatabase::quote($value."%");
+                        $rtvalue = " ".$adb->getLike()." ".$adb->quote($value."%");
                 }
                 if($comparator == "c")
                 {
-                        $rtvalue = " ".$adb->getLike()." ".PearDatabase::quote("%".$value."%");
+                        $rtvalue = " ".$adb->getLike()." ".$adb->quote("%".$value."%");
                 }
                 if($comparator == "k")
                 {
-                        $rtvalue = " not ".$adb->getLike()." ".PearDatabase::quote("%".$value."%");
+                        $rtvalue = " not ".$adb->getLike()." ".$adb->quote("%".$value."%");
                 }
                 if($comparator == "l")
                 {
-                        $rtvalue = " < ".PearDatabase::quote($value);
+                        $rtvalue = " < ".$adb->quote($value);
                 }
                 if($comparator == "g")
 								{
-                        $rtvalue = " > ".PearDatabase::quote($value);
+                        $rtvalue = " > ".$adb->quote($value);
                 }
                 if($comparator == "m")
                 {
-                        $rtvalue = " <= ".PearDatabase::quote($value);
+                        $rtvalue = " <= ".$adb->quote($value);
                 }
                 if($comparator == "h")
                 {
-                        $rtvalue = " >= ".PearDatabase::quote($value);
+                        $rtvalue = " >= ".$adb->quote($value);
                 }
 
                 $vtlog->logthis("ReportRun :: Successfully returned getAdvComparator","info");

Modified: vtigercrm/branches/4.2/modules/Users/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Users/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Users/ListView.php Mon Jun 12 14:04:34 2006
@@ -67,21 +67,21 @@
 	$where_clauses = Array();
 	
 	$adb->checkConnection();
-	if(isset($last_name) && $last_name != "") array_push($where_clauses, "last_name ".$adb->getLike()." ".PearDatabase::quote($last_name.'%')."");
-	if(isset($first_name) && $first_name != "") array_push($where_clauses, "first_name ".$adb->getLike()." ".PearDatabase::quote($first_name.'%')."");
-	if(isset($user_name) && $user_name != "") array_push($where_clauses, "user_name ".$adb->getLike()." ".PearDatabase::quote($user_name.'%')."");
-	if(isset($status) && $status != "") array_push($where_clauses, "status = ".PearDatabase::quote($status)."");
-	if(isset($is_admin) && $is_admin != "") array_push($where_clauses, "is_admin = ".PearDatabase::quote($is_admin)."");
-	if(isset($phone) && $phone != "") array_push($where_clauses, "(phone_home ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%')." OR phone_mobile ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%')." OR phone_work ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%')." OR phone_other ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%')." OR phone_fax ".$adb->getLike()." ".PearDatabase::quote('%'.$phone.'%').")");
-	if(isset($email) && $email != "") array_push($where_clauses, "(users.email1 ".$adb->getLike()." ".PearDatabase::quote($email.'%')." OR users.email2 ".$adb->getLike()." ".PearDatabase::quote($email.'%').")");
-	if(isset($yahoo_id) && $yahoo_id != "") array_push($where_clauses, "yahoo_id ".$adb->getLike()." ".PearDatabase::quote($yahoo_id.'%')."");
-	if(isset($department) && $department != "") array_push($where_clauses, "department ".$adb->getLike()." ".PearDatabase::quote($department.'%')."");
-	if(isset($title) && $title != "") array_push($where_clauses, "title ".$adb->getLike()." ".PearDatabase::quote($title.'%')."");
-	if(isset($address_street) && $address_street != "") array_push($where_clauses, "address_street ".$adb->getLike()." ".PearDatabase::quote($address_street.'%')."");
-	if(isset($address_city) && $address_city != "") array_push($where_clauses, "address_city ".$adb->getLike()." ".PearDatabase::quote($address_city.'%')."");
-	if(isset($address_state) && $address_state != "") array_push($where_clauses, "address_state ".$adb->getLike()." ".PearDatabase::quote($address_state.'%')."");
-	if(isset($address_postalcode) && $address_postalcode != "") array_push($where_clauses, "address_postalcode ".$adb->getLike()." ".PearDatabase::quote($address_postalcode.'%')."");
-	if(isset($address_country) && $address_country != "") array_push($where_clauses, "address_country ".$adb->getLike()." ".PearDatabase::quote($address_country.'%')."");
+	if(isset($last_name) && $last_name != "") array_push($where_clauses, "last_name ".$adb->getLike()." ".$adb->quote($last_name.'%')."");
+	if(isset($first_name) && $first_name != "") array_push($where_clauses, "first_name ".$adb->getLike()." ".$adb->quote($first_name.'%')."");
+	if(isset($user_name) && $user_name != "") array_push($where_clauses, "user_name ".$adb->getLike()." ".$adb->quote($user_name.'%')."");
+	if(isset($status) && $status != "") array_push($where_clauses, "status = ".$adb->quote($status)."");
+	if(isset($is_admin) && $is_admin != "") array_push($where_clauses, "is_admin = ".$adb->quote($is_admin)."");
+	if(isset($phone) && $phone != "") array_push($where_clauses, "(phone_home ".$adb->getLike()." ".$adb->quote('%'.$phone.'%')." OR phone_mobile ".$adb->getLike()." ".$adb->quote('%'.$phone.'%')." OR phone_work ".$adb->getLike()." ".$adb->quote('%'.$phone.'%')." OR phone_other ".$adb->getLike()." ".$adb->quote('%'.$phone.'%')." OR phone_fax ".$adb->getLike()." ".$adb->quote('%'.$phone.'%').")");
+	if(isset($email) && $email != "") array_push($where_clauses, "(users.email1 ".$adb->getLike()." ".$adb->quote($email.'%')." OR users.email2 ".$adb->getLike()." ".$adb->quote($email.'%').")");
+	if(isset($yahoo_id) && $yahoo_id != "") array_push($where_clauses, "yahoo_id ".$adb->getLike()." ".$adb->quote($yahoo_id.'%')."");
+	if(isset($department) && $department != "") array_push($where_clauses, "department ".$adb->getLike()." ".$adb->quote($department.'%')."");
+	if(isset($title) && $title != "") array_push($where_clauses, "title ".$adb->getLike()." ".$adb->quote($title.'%')."");
+	if(isset($address_street) && $address_street != "") array_push($where_clauses, "address_street ".$adb->getLike()." ".$adb->quote($address_street.'%')."");
+	if(isset($address_city) && $address_city != "") array_push($where_clauses, "address_city ".$adb->getLike()." ".$adb->quote($address_city.'%')."");
+	if(isset($address_state) && $address_state != "") array_push($where_clauses, "address_state ".$adb->getLike()." ".$adb->quote($address_state.'%')."");
+	if(isset($address_postalcode) && $address_postalcode != "") array_push($where_clauses, "address_postalcode ".$adb->getLike()." ".$adb->quote($address_postalcode.'%')."");
+	if(isset($address_country) && $address_country != "") array_push($where_clauses, "address_country ".$adb->getLike()." ".$adb->quote($address_country.'%')."");
 
 
 	$where = "";





More information about the vtigercrm-commits mailing list