From e39d4fada303be4c0a1f13e1b8a14334a7c2a9cd Mon Sep 17 00:00:00 2001 From: Niko Bochan Date: Mon, 1 Dec 2014 11:22:50 +0100 Subject: [PATCH] order items alphabetically if weights are the same --- CRM/Utils/Sort.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/Sort.php b/CRM/Utils/Sort.php index 8f56c9dc82..36c61abd21 100644 --- a/CRM/Utils/Sort.php +++ b/CRM/Utils/Sort.php @@ -284,7 +284,9 @@ class CRM_Utils_Sort { * @access public */ static function cmpFunc($a, $b) { + if($a['weight'] == $b['weight']) { + return strcmp($a['title'], $b['title']); + } return ($a['weight'] <= $b['weight']) ? -1 : 1; } } - -- 2.25.1