From fec9f1174ad74d043f2f47998ad44a0e61d13c59 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 04 Jun 2012 04:13:42 -0400 Subject: [PATCH] Modify CONCAT() arguments, because + operator requires them to be of type varchar (#1488505) With SQL Server 2012 we can use just CONCAT(), but we need to support older versions --- CHANGELOG | 1 + program/include/rcube_mdb2.php | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6aa506a..739641e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix SQL query for contacts listing on MS SQL Server (#1488505) - Update to TinyMCE 3.5.2 - Fix window.resize handler on IE8 and Opera (#1488453) - Don't let error message popups cover the login form (#1488500) diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php index c103f9a..3d8891d 100644 --- a/program/include/rcube_mdb2.php +++ b/program/include/rcube_mdb2.php @@ -648,6 +648,11 @@ case 'mssql': case 'sqlsrv': $delim = ' + '; + // Modify arguments, because + operator requires them to be of type varchar (#1488505) + // with SQL Server 2012 we can use just CONCAT(), but we need to support older versions + foreach ($args as $idx => $arg) { + $args[$idx] = "CAST($arg AS varchar)"; + } break; default: $delim = ' || '; -- Gitblit v1.9.1