View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004819 | OXID eShop (all versions) | 4.01. Database handling | public | 2013-01-02 16:00 | 2022-01-31 15:54 |
Reporter | FibreFoX | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | 4.7.2 / 5.0.2 revision 53018 | ||||
Summary | 0004819: escapeString should use adodb-lite quote-function | ||||
Description | the quote/qstr-function from the adodb-lite-driver can be used, to there is no need to re-check which mysql/i-function-call is needed. // before public function escapeString( $sString ) { $myConfig = $this->getConfig(); if ( 'mysql' == $myConfig->getConfigParam( "dbType" )) { return mysql_real_escape_string( $sString, $this->_getConnectionId() ); } elseif ( 'mysqli' == $myConfig->getConfigParam( "dbType" )) { return mysqli_real_escape_string( $this->_getConnectionId(), $sString ); } else { return mysql_real_escape_string( $sString, $this->_getConnectionId() ); } } // after // due to the fact that qstr is returnin 'something' (with quotation-marks), the result can't be returned unhandled public function escapeString( $sString ) { $adoDBLiteQuoted = self::getDb()->quote( $sString ); // no need to worry about mysql/i here return substr( $adoDBLiteQuoted, 1, -1) ; } | ||||
Additional Information | the function _getConnectionId from oxdb would get deprecated because it isn't needed anymore (at least in CE-version) | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||