From: Chamil Wijesooriya Date: Wed, 11 Jul 2018 12:03:15 +0000 (+0100) Subject: Issue #93 Update CRM_Utils_Rule::mysqlOrderBy() to accommodate more than 2 joins X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=492d303f386ed57a9d11183b8e275ee39b49cf0b;p=civicrm-core.git Issue #93 Update CRM_Utils_Rule::mysqlOrderBy() to accommodate more than 2 joins --- 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; } }