[Vtigercrm-commits] [vtiger-commits] r5635 - in /vtigercrm/trunk: ./ data/ include/utils/ modules/CustomView/ modules/Emails/ modules/Products/ modules/Reports/ modules/Webmails/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 2 03:12:45 EDT 2006


Author: saraj
Date: Tue May  2 01:11:46 2006
New Revision: 5635

Log:
PearDatabase::quote changed to ->quote

Modified:
    vtigercrm/trunk/Popup.php
    vtigercrm/trunk/data/SugarBean.php
    vtigercrm/trunk/include/utils/DeleteUtils.php
    vtigercrm/trunk/modules/CustomView/CustomView.php
    vtigercrm/trunk/modules/Emails/Email.php
    vtigercrm/trunk/modules/Emails/sendmail.php
    vtigercrm/trunk/modules/Emails/updateRelations.php
    vtigercrm/trunk/modules/Products/AddProductsToPriceBook.php
    vtigercrm/trunk/modules/Reports/ReportRun.php
    vtigercrm/trunk/modules/Webmails/sendmail.php
    vtigercrm/trunk/vtigercrm5_alpha_Security.html

Modified: vtigercrm/trunk/Popup.php
==============================================================================
--- vtigercrm/trunk/Popup.php (original)
+++ vtigercrm/trunk/Popup.php Tue May  2 01:11:46 2006
@@ -184,15 +184,15 @@
 		if (isset($_REQUEST['title'])) $title = $_REQUEST['title'];
 
 		if(isset($lastname) && $lastname != "") {
-			array_push($where_clauses, "contactdetails.lastname like ".PearDatabase::quote($lastname.'%')."");
+			array_push($where_clauses, "contactdetails.lastname like ".$adb->quote($lastname.'%')."");
 			$url_string .= "&lastname=".$lastname;
 		}
 		if(isset($firstname) && $firstname != "") {
-			array_push($where_clauses, "contactdetails.firstname like ".PearDatabase::quote($firstname.'%')."");
+			array_push($where_clauses, "contactdetails.firstname like ".$adb->quote($firstname.'%')."");
 			$url_string .= "&firstname=".$firstname;
 		}
 		if(isset($title) && $title != "")       {
-			array_push($where_clauses, "contactdetails.title like ".PearDatabase::quote("%".$title.'%')."");
+			array_push($where_clauses, "contactdetails.title like ".$adb->quote("%".$title.'%')."");
 			$url_string .= "&title=".$title;
 		}
 		if(isset($current_user_only) && $current_user_only != "") {
@@ -209,16 +209,16 @@
 		if (isset($_REQUEST['address_city'])) $address_city = $_REQUEST['address_city'];
 
 		if(isset($name) && $name != ""){
-			array_push($where_clauses, "account.accountname like ".PearDatabase::quote($name."%"));
+			array_push($where_clauses, "account.accountname like ".$adb->quote($name."%"));
 			$url_string .= "&name=".$name;
 		}
-		if(isset($website) && $website != "") array_push($where_clauses, "account.website like ".PearDatabase::quote("%".$website."%"));
-		if(isset($phone) && $phone != "") array_push($where_clauses, "(account.phone like ".PearDatabase::quote("%".$phone."%")." OR account.otherphone like ".PearDatabase::quote("%".$phone."%")." OR account.fax like ".PearDatabase::quote("%".$phone."%").")");
+		if(isset($website) && $website != "") array_push($where_clauses, "account.website like ".$adb->quote("%".$website."%"));
+		if(isset($phone) && $phone != "") array_push($where_clauses, "(account.phone like ".$adb->quote("%".$phone."%")." OR account.otherphone like ".$adb->quote("%".$phone."%")." OR account.fax like ".$adb->quote("%".$phone."%").")");
 		if(isset($address_city) && $address_city != ""){
-			array_push($where_clauses, "(accountbillads.city like ".PearDatabase::quote("%".$address_city."%")." OR accountshipads.city like ".PearDatabase::quote($address_city."%").")");
+			array_push($where_clauses, "(accountbillads.city like ".$adb->quote("%".$address_city."%")." OR accountshipads.city like ".$adb->quote($address_city."%").")");
 			$url_string .= "&address_city=".$address_city;
 		}
-		if(isset($ownership) && $ownership != "") array_push($where_clauses, "account.ownership like ".PearDatabase::quote($ownership."%"));
+		if(isset($ownership) && $ownership != "") array_push($where_clauses, "account.ownership like ".$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;
@@ -254,11 +254,11 @@
 		if (isset($_REQUEST['account_name'])) $accountname = $_REQUEST['account_name'];
 
 		if(isset($name) && $name != "") {
-			array_push($where_clauses, "potential.potentialname like ".PearDatabase::quote($name.'%')."");
+			array_push($where_clauses, "potential.potentialname like ".$adb->quote($name.'%')."");
 			$url_string .= "&name=".$name;
 		}
 		if(isset($accountname) && $accountname != "") {
-			array_push($where_clauses, "account.accountname like ".PearDatabase::quote('%'.$accountname.'%')."");
+			array_push($where_clauses, "account.accountname like ".$adb->quote('%'.$accountname.'%')."");
 			$url_string .= "&account_name=".$accountname;
 		}
 		if(isset($current_user_only) && $current_user_only != "") {
@@ -276,18 +276,18 @@
 		if (isset($_REQUEST['accountname'])) $accountname = $_REQUEST['accountname'];
 		if(isset($subject) && $subject != "")
 		{
-			array_push($where_clauses, "quotes.subject like ".PearDatabase::quote($subject."%"));
+			array_push($where_clauses, "quotes.subject like ".$adb->quote($subject."%"));
 			$url_string .= "&subject=".$subject;
 		}
 		if(isset($accountname) && $accountname != "")
 		{
-			array_push($where_clauses, "account.accountname like ".PearDatabase::quote("%".$accountname."%"));
+			array_push($where_clauses, "account.accountname like ".$adb->quote("%".$accountname."%"));
 			$url_string .= "&accountname=".$accountname;
 		}
 
 		if(isset($quotestage) && $quotestage != "")
 		{
-			array_push($where_clauses, "quotes.quotestage like ".PearDatabase::quote("%".$quotestage."%"));
+			array_push($where_clauses, "quotes.quotestage like ".$adb->quote("%".$quotestage."%"));
 			$url_string .= "&quotestage=".$quotestage;
 		}
 
@@ -359,18 +359,18 @@
 		$where_clauses = Array();
 		if(isset($subject) && $subject != '')
 		{
-			array_push($where_clauses, "purchaseorder.subject like ".PearDatabase::quote($subject."%"));
+			array_push($where_clauses, "purchaseorder.subject like ".$adb->quote($subject."%"));
 			$url_string .= "&subject=".$subject;
 
 		}
 		if(isset($vendorname) && $vendorname != "")
 		{
-			array_push($where_clauses, "vendor.vendorname like ".PearDatabase::quote("%".$vendorname."%"));
+			array_push($where_clauses, "vendor.vendorname like ".$adb->quote("%".$vendorname."%"));
 			$url_string .= "&vendorname=".$vendorname;
 		}
 		if(isset($trackingno) && $trackingno != "")
 		{
-			array_push($where_clauses, "purchaseorder.tracking_no like ".PearDatabase::quote("%".$trackingno."%"));
+			array_push($where_clauses, "purchaseorder.tracking_no like ".$adb->quote("%".$trackingno."%"));
 			$url_string .= "&trackingno=".$trackingno;
 		}
 	}
@@ -387,19 +387,19 @@
 
 		if (isset($subject) && $subject !='')
 		{
-			array_push($where_clauses, "salesorder.subject like ".PearDatabase::quote($subject.'%'));
+			array_push($where_clauses, "salesorder.subject like ".$adb->quote($subject.'%'));
 			$url_string .= "&subject=".$subject;
 		}	
 
 		if (isset($accountname) && $accountname !='')
 		{
-			array_push($where_clauses, "account.accountname like ".PearDatabase::quote($accountname.'%'));
+			array_push($where_clauses, "account.accountname like ".$adb->quote($accountname.'%'));
 			$url_string .= "&accountname=".$accountname;
 		}
 
 		if (isset($quotename) && $quotename !='')
 		{
-			array_push($where_clauses, "quotes.subject like ".PearDatabase::quote($quotename.'%'));
+			array_push($where_clauses, "quotes.subject like ".$adb->quote($quotename.'%'));
 			$url_string .= "&quotename=".$quotename;
 		}
 
@@ -432,21 +432,21 @@
 		}
 		if (isset($vendorname) && $vendorname !='')
 		{
-			array_push($where_clauses, "vendorname like ".PearDatabase::quote($vendorname.'%'));
+			array_push($where_clauses, "vendorname like ".$adb->quote($vendorname.'%'));
 			//$search_query .= " and productname like '".$productname."%'";
 			$url_string .= "&vendorname=".$vendorname;
 		}
 
 		if (isset($companyname) && $companyname !='')
 		{
-			array_push($where_clauses, "company_name like ".PearDatabase::quote($companyname.'%'));
+			array_push($where_clauses, "company_name like ".$adb->quote($companyname.'%'));
 			//$search_query .= " and productcode like '".$productcode."%'";
 			$url_string .= "&companyname=".$companyname;
 		}
 
 		if (isset($category) && $category !='')
 		{
-			array_push($where_clauses, "category like ".PearDatabase::quote($category.'%'));
+			array_push($where_clauses, "category like ".$adb->quote($category.'%'));
 			//$search_query .= " and productcode like '".$productcode."%'";
 			$url_string .= "&category=".$category;
 		}
@@ -466,7 +466,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/trunk/data/SugarBean.php
==============================================================================
Binary files - no diff available.

Modified: vtigercrm/trunk/include/utils/DeleteUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DeleteUtils.php (original)
+++ vtigercrm/trunk/include/utils/DeleteUtils.php Tue May  2 01:11:46 2006
@@ -76,7 +76,7 @@
 		}
 	break;
 	case Emails:
-		$sql='delete from seactivityrel where activityid='.PearDatabase::quote($record);
+		$sql='delete from seactivityrel where activityid='.$adb->quote($record);
 		$adb->query($sql);
 	break;
 	case HelpDesk:

Modified: vtigercrm/trunk/modules/CustomView/CustomView.php
==============================================================================
--- vtigercrm/trunk/modules/CustomView/CustomView.php (original)
+++ vtigercrm/trunk/modules/CustomView/CustomView.php Tue May  2 01:11:46 2006
@@ -906,11 +906,12 @@
 
 	function getAdvComparator($comparator,$value)
 	{
+		global $adb;
 		if($comparator == "e")
 		{
 			if(trim($value) != "")
 			{
-				$rtvalue = " = ".PearDatabase::quote($value);
+				$rtvalue = " = ".$adb->quote($value);
 			}else
 			{
 				$rtvalue = " is NULL";
@@ -920,7 +921,7 @@
 		{
 			if(trim($value) != "")
 			{
-				$rtvalue = " <> ".PearDatabase::quote($value);
+				$rtvalue = " <> ".$adb->quote($value);
 			}else
 			{
 				$rtvalue = "is NOT NULL";
@@ -928,31 +929,31 @@
 		}
 		if($comparator == "s")
 		{
-			$rtvalue = " like ".PearDatabase::quote($value."%");
+			$rtvalue = " like ".$adb->quote($value."%");
 		}
 		if($comparator == "c")
 		{
-			$rtvalue = " like ".PearDatabase::quote("%".$value."%");
+			$rtvalue = " like ".$adb->quote("%".$value."%");
 		}
 		if($comparator == "k")
 		{
-			$rtvalue = " not like ".PearDatabase::quote("%".$value."%");
+			$rtvalue = " not like ".$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/trunk/modules/Emails/Email.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/Email.php (original)
+++ vtigercrm/trunk/modules/Emails/Email.php Tue May  2 01:11:46 2006
@@ -105,7 +105,7 @@
 		$button = '';
 		$returnset = '&return_module=Emails&return_action=DetailView&return_id='.$id;
 
-		$query = 'select contactdetails.accountid, contactdetails.contactid, contactdetails.firstname,contactdetails.lastname, contactdetails.department, contactdetails.title, contactdetails.email, contactdetails.phone, contactdetails.emailoptout, crmentity.crmid, crmentity.smownerid, crmentity.modifiedtime from contactdetails inner join cntactivityrel on cntactivityrel.contactid=contactdetails.contactid inner join crmentity on crmentity.crmid = contactdetails.contactid left join contactgrouprelation on contactdetails.contactid=contactgrouprelation.contactid left join groups on groups.groupname=contactgrouprelation.groupname where cntactivityrel.activityid='.PearDatabase::quote($id).' and crmentity.deleted=0';
+		$query = 'select contactdetails.accountid, contactdetails.contactid, contactdetails.firstname,contactdetails.lastname, contactdetails.department, contactdetails.title, contactdetails.email, contactdetails.phone, contactdetails.emailoptout, crmentity.crmid, crmentity.smownerid, crmentity.modifiedtime from contactdetails inner join cntactivityrel on cntactivityrel.contactid=contactdetails.contactid inner join crmentity on crmentity.crmid = contactdetails.contactid left join contactgrouprelation on contactdetails.contactid=contactgrouprelation.contactid left join groups on groups.groupname=contactgrouprelation.groupname where cntactivityrel.activityid='.$adb->quote($id).' and crmentity.deleted=0';
 		$log->info("Contact Related List for Email is Displayed");
 		$log->debug("Exiting get_contacts method ...");
 		return GetRelatedList('Emails','Contacts',$focus,$query,$button,$returnset);
@@ -126,7 +126,7 @@
 
 		$id = $_REQUEST['record'];
 
-		$query = 'SELECT users.id, users.first_name,users.last_name, users.user_name, users.email1, users.email2, users.yahoo_id, users.phone_home, users.phone_work, users.phone_mobile, users.phone_other, users.phone_fax from users inner join salesmanactivityrel on salesmanactivityrel.smid=users.id and salesmanactivityrel.activityid='.PearDatabase::quote($id);
+		$query = 'SELECT users.id, users.first_name,users.last_name, users.user_name, users.email1, users.email2, users.yahoo_id, users.phone_home, users.phone_work, users.phone_mobile, users.phone_other, users.phone_fax from users inner join salesmanactivityrel on salesmanactivityrel.smid=users.id and salesmanactivityrel.activityid='.$adb->quote($id);
 		$result=$adb->query($query);   
 
 		$noofrows = $adb->num_rows($result);
@@ -193,7 +193,7 @@
 			left join seattachmentsrel  on seattachmentsrel.crmid =notes.notesid
 			left join attachments on seattachmentsrel.attachmentsid = attachments.attachmentsid
 			inner join users on crm2.smcreatorid= users.id
-		where crmentity.crmid=".PearDatabase::quote($id);
+		where crmentity.crmid=".$adb->quote($id);
 		$query .= ' union all ';
 		$query .= "select attachments.description title ,'Attachments'  ActivityType,
 			attachments.name filename, attachments.type FileType,crm2.modifiedtime lastmodified,
@@ -204,7 +204,7 @@
 			inner join crmentity on crmentity.crmid= seattachmentsrel.crmid
 			inner join crmentity crm2 on crm2.crmid=attachments.attachmentsid
 			inner join users on crm2.smcreatorid= users.id
-		where crmentity.crmid=".PearDatabase::quote($id);
+		where crmentity.crmid=".$adb->quote($id);
 		
 		$log->info("Notes&Attachments Related List for Email is Displayed");
 		$log->debug("Exiting get_attachments method ...");

Modified: vtigercrm/trunk/modules/Emails/sendmail.php
==============================================================================
Binary files - no diff available.

Modified: vtigercrm/trunk/modules/Emails/updateRelations.php
==============================================================================
Binary files - no diff available.

Modified: vtigercrm/trunk/modules/Products/AddProductsToPriceBook.php
==============================================================================
--- vtigercrm/trunk/modules/Products/AddProductsToPriceBook.php (original)
+++ vtigercrm/trunk/modules/Products/AddProductsToPriceBook.php Tue May  2 01:11:46 2006
@@ -84,56 +84,56 @@
 
 	if (isset($productname) && $productname !='')
 	{
-		array_push($where_clauses, "productname like ".PearDatabase::quote($productname.'%'));
+		array_push($where_clauses, "productname like ".$adb->quote($productname.'%'));
 		$url_string .= "&productname=".$productname;
 	}
 	
 	if (isset($productcode) && $productcode !='')
 	{
-		array_push($where_clauses, "productcode like ".PearDatabase::quote($productcode.'%'));
+		array_push($where_clauses, "productcode like ".$adb->quote($productcode.'%'));
 		$url_string .= "&productcode=".$productcode;
 	}
 
 	if (isset($commissionrate) && $commissionrate !='')
 	{
-		array_push($where_clauses, "commissionrate like ".PearDatabase::quote($commissionrate.'%'));
+		array_push($where_clauses, "commissionrate like ".$adb->quote($commissionrate.'%'));
 		 $url_string .= "&commissionrate=".$commissionrate;
 	}
 	
 	if (isset($qtyperunit) && $qtyperunit !='')
 	{
-		array_push($where_clauses, "qty_per_unit like ".PearDatabase::quote($qtyperunit.'%'));
+		array_push($where_clauses, "qty_per_unit like ".$adb->quote($qtyperunit.'%'));
 		$url_string .= "&qtyperunit=".$qtyperunit;
 	}
 	
 	if (isset($unitprice) && $unitprice !='')
 	{
-		array_push($where_clauses, "unit_price like ".PearDatabase::quote($unitprice.'%'));
+		array_push($where_clauses, "unit_price like ".$adb->quote($unitprice.'%'));
 		$url_string .= "&unitprice=".$unitprice;
 	}
 	if (isset($manufacturer) && $manufacturer !='' && $manufacturer !='--None--')
         {
-		array_push($where_clauses, "manufacturer like ".PearDatabase::quote($manufacturer.'%'));
+		array_push($where_clauses, "manufacturer like ".$adb->quote($manufacturer.'%'));
                 $url_string .= "&manufacturer=".$manufacturer;
 	}
 	if (isset($productcategory) && $productcategory !='' && $productcategory !='--None--')
         {
-		array_push($where_clauses, "productcategory like ".PearDatabase::quote($productcategory.'%'));
+		array_push($where_clauses, "productcategory like ".$adb->quote($productcategory.'%'));
                 $url_string .= "&productcategory=".$productcategory;
 	}
 	if (isset($start_date) && $start_date !='')
         {
-		array_push($where_clauses, "start_date like ".PearDatabase::quote($start_date.'%'));
+		array_push($where_clauses, "start_date like ".$adb->quote($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.'%'));
+		array_push($where_clauses, "expiry_date like ".$adb->quote($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.'%'));
+		array_push($where_clauses, "purchase_date like ".$adb->quote($purchase_date.'%'));
                 $url_string .= "&purchase_date=".$purchase_date;
         }
 	$where = "";

Modified: vtigercrm/trunk/modules/Reports/ReportRun.php
==============================================================================
--- vtigercrm/trunk/modules/Reports/ReportRun.php (original)
+++ vtigercrm/trunk/modules/Reports/ReportRun.php Tue May  2 01:11:46 2006
@@ -154,7 +154,7 @@
                 {
                         if(trim($value) != "")
 			{
-				$rtvalue = " = ".PearDatabase::quote($value);
+				$rtvalue = " = ".$adb->quote($value);
 			}else
 			{
 				$rtvalue = " is NULL";
@@ -164,7 +164,7 @@
                 {
                         if(trim($value) != "")
 			{
-				$rtvalue = " <> ".PearDatabase::quote($value);
+				$rtvalue = " <> ".$adb->quote($value);
 			}else
 			{
 				$rtvalue = " is NOT NULL";
@@ -172,31 +172,31 @@
                 }
                 if($comparator == "s")
                 {
-                        $rtvalue = " like ".PearDatabase::quote($value."%");
+                        $rtvalue = " like ".$adb->quote($value."%");
                 }
                 if($comparator == "c")
                 {
-                        $rtvalue = " like ".PearDatabase::quote("%".$value."%");
+                        $rtvalue = " like ".$adb->quote("%".$value."%");
                 }
                 if($comparator == "k")
                 {
-                        $rtvalue = " not like ".PearDatabase::quote("%".$value."%");
+                        $rtvalue = " not like ".$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);
                 }
 
 		 $log->info("ReportRun :: Successfully returned getAdvComparator");

Modified: vtigercrm/trunk/modules/Webmails/sendmail.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/sendmail.php (original)
+++ vtigercrm/trunk/modules/Webmails/sendmail.php Tue May  2 01:11:46 2006
@@ -37,7 +37,7 @@
 		$mail->Subject = "Re: ".$subject;
 
 
-	//$DESCRIPTION .= '<font color=darkgrey>'.nl2br($adb->query_result($adb->query("select * from users where user_name=".PearDatabase::quote($from).),0,"signature")).'</font>';
+	//$DESCRIPTION .= '<font color=darkgrey>'.nl2br($adb->query_result($adb->query("select * from users where user_name=".$adb->quote($from).),0,"signature")).'</font>';
 
         $mail->Body = $body;
 	$mail->IsSMTP();

Modified: vtigercrm/trunk/vtigercrm5_alpha_Security.html
==============================================================================
--- vtigercrm/trunk/vtigercrm5_alpha_Security.html (original)
+++ vtigercrm/trunk/vtigercrm5_alpha_Security.html Tue May  2 01:11:46 2006
@@ -231,7 +231,7 @@
       operations on the records. </p>
 <p>  <span style="font-weight: bold;">Groups </span>in
         user management
-        facilitate to Add/Edit/Delete/View Roles.<span style="font-weight: bold;">
+        facilitate to Add/Edit/Delete/View Groups.<span style="font-weight: bold;">
 </span></p>
 <table width="80%"  border="1">
   <tr>





More information about the vtigercrm-commits mailing list