Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Query.php #8238

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CRM/Contact/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -4557,7 +4557,10 @@ public function searchQuery(
$groupBy = 'GROUP BY civicrm_activity.id ';
}

$order = $orderBy = $limit = '';
// let's sort it in alphabet order by default, for now it sorts by ID each time more than on search criteria is being selected
// (like part of the name and relationship type, etc.)
$order = " order by contact_a.sort_name asc";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yurg for consistency, I think order by should be uppercased.

$orderBy = $limit = '';
if (!$count) {
$config = CRM_Core_Config::singleton();
if ($config->includeOrderByClause ||
Expand Down