[Vtigercrm-commits] [vtiger-commits] r7056 - in /vtigercrm/branches/4.2: include/database/PearDatabase.php modules/Settings/add2db.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Jun 13 12:10:01 EDT 2006


Author: allanbush
Date: Tue Jun 13 10:09:56 2006
New Revision: 7056

Log:
Fixes #1271.  Using the instance quote method from adodb instead of the static one as the instance knows the database type and can do the correct thing.

Modified:
    vtigercrm/branches/4.2/include/database/PearDatabase.php
    vtigercrm/branches/4.2/modules/Settings/add2db.php

Modified: vtigercrm/branches/4.2/include/database/PearDatabase.php
==============================================================================
--- vtigercrm/branches/4.2/include/database/PearDatabase.php (original)
+++ vtigercrm/branches/4.2/include/database/PearDatabase.php Tue Jun 13 10:09:56 2006
@@ -744,20 +744,8 @@
         }
 }
 
-/* ADODB converted	
 function quote($string){
-	global $dbconfig;
-	if($dbconfig['db_type'] == 'mysql'){
-		$string = mysql_escape_string($string);
-	}else {$string = quoteSmart($string);}
-	}else {$string = $this->database->qstr($string,get_magic_quotes_gpc());}
-	//$string = strtr($string, array('_' => '\_', '%'=>'\%'));
-	return $string;
-}*/
-
-
-function quote($string){
-	return ADOConnection::qstr($string);	
+	return $this->database->qstr($string);	
 }
 
 

Modified: vtigercrm/branches/4.2/modules/Settings/add2db.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Settings/add2db.php (original)
+++ vtigercrm/branches/4.2/modules/Settings/add2db.php Tue Jun 13 10:09:56 2006
@@ -112,7 +112,7 @@
 
 	$sql="SELECT * FROM organizationdetails WHERE organizationame = ".$adb->quote($org_name);
 	$result = $adb->query($sql);
-	$org_name = $adb->query_result($result,0,'organizationame');
+	$org_name = from_html($adb->query_result($result,0,'organizationame'));
 	$org_logo = $adb->query_result($result,0,'logoname'); 
 
 





More information about the vtigercrm-commits mailing list