[Vtigercrm-commits] [vtiger-commits] r7057 - in /vtigercrm/trunk: include/database/PearDatabase.php modules/Settings/add2db.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Jun 13 12:18:00 EDT 2006
Author: allanbush
Date: Tue Jun 13 10:17:58 2006
New Revision: 7057
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/trunk/include/database/PearDatabase.php
vtigercrm/trunk/modules/Settings/add2db.php
Modified: vtigercrm/trunk/include/database/PearDatabase.php
==============================================================================
--- vtigercrm/trunk/include/database/PearDatabase.php (original)
+++ vtigercrm/trunk/include/database/PearDatabase.php Tue Jun 13 10:17:58 2006
@@ -742,20 +742,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/trunk/modules/Settings/add2db.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/add2db.php (original)
+++ vtigercrm/trunk/modules/Settings/add2db.php Tue Jun 13 10:17:58 2006
@@ -101,7 +101,7 @@
$sql="SELECT * FROM vtiger_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