CRM-18684 fix fatal error by backporting 4.7 hack
authoreileenmcnaugton <eileen@fuzion.co.nz>
Fri, 27 May 2016 04:24:50 +0000 (16:24 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Fri, 27 May 2016 04:28:53 +0000 (16:28 +1200)
CRM/Contact/BAO/Query.php

index 9ab5622e9fe570e4da178158771f8e1db61249a1..4bf2395ece99c851ff094a274e01b7c3500ae89b 100644 (file)
@@ -5807,6 +5807,10 @@ AND   displayRelType.is_active = 1
         else {
           $orderBy = trim($sort->orderBy());
         }
+        // Deliberately remove the backticks again, as they mess up the evil
+        // string munging below. This balanced by re-escaping before use.
+        $orderBy = str_replace('`', '', $orderBy);
+
         if (!empty($orderBy)) {
           // this is special case while searching for
           // change log CRM-1718