From 492d303f386ed57a9d11183b8e275ee39b49cf0b Mon Sep 17 00:00:00 2001 From: Chamil Wijesooriya Date: Wed, 11 Jul 2018 13:03:15 +0100 Subject: [PATCH] Issue #93 Update CRM_Utils_Rule::mysqlOrderBy() to accommodate more than 2 joins --- CRM/Utils/Rule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index 61a467451f..9f3345930c 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -157,7 +157,7 @@ class CRM_Utils_Rule { // at all, so we split and loop over. $parts = explode(',', $str); foreach ($parts as $part) { - if (!preg_match('/^((`[\w-]{1,64}`|[\w-]{1,64})\.)?(`[\w-]{1,64}`|[\w-]{1,64})( (asc|desc))?$/i', trim($part))) { + if (!preg_match('/^((`[\w-]{1,64}`|[\w-]{1,64})\.)+?(`[\w-]{1,64}`|[\w-]{1,64})( (asc|desc))?$/i', trim($part))) { return FALSE; } } -- 2.25.1