Skip to content

Commit

Permalink
mssql: don't encode contents when uploading attachments
Browse files Browse the repository at this point in the history
Downloads are broken and inline preview doesn't work.

Move "case 'mssqlnative':" down next to 'oci8' in
db_prepare_binary_string (database_api) to effectively
return the string unchanged via 'default:'. Adjust comment.

Fixes #22208

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information
obmsch authored and dregad committed Mar 31, 2017
1 parent 8decd71 commit 43c4b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/database_api.php
Expand Up @@ -772,7 +772,6 @@ function db_prepare_binary_string( $p_string ) {

switch( $t_db_type ) {
case 'mssql':
case 'mssqlnative':
case 'odbc_mssql':
case 'ado_mssql':
$t_content = unpack( 'H*hex', $p_string );
Expand All @@ -784,8 +783,9 @@ function db_prepare_binary_string( $p_string ) {
case 'pgsql':
return $g_db->BlobEncode( $p_string );
break;
case 'mssqlnative':
case 'oci8':
# Fall through, oci8 stores raw data in BLOB
# Fall through, mssqlnative, oci8 store raw data in BLOB
default:
return $p_string;
break;
Expand Down

0 comments on commit 43c4b6f

Please sign in to comment.