Skip to content

Commit

Permalink
Merge pull request #27 from derekjones/feature/mysql-5.7-compat
Browse files Browse the repository at this point in the history
Feature/mysql 5.7 strict mode compat
  • Loading branch information
mrw authored Dec 5, 2018
2 parents 454e1e6 + d1bfd65 commit a53a44b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
2 changes: 1 addition & 1 deletion system/user/addons/vmg_chosen_member/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

if ( ! defined('VMG_CM_VERSION'))
{
define('VMG_CM_VERSION', '3.1');
define('VMG_CM_VERSION', '3.1.1');
}

/**
Expand Down
10 changes: 10 additions & 0 deletions system/user/addons/vmg_chosen_member/helper.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public function memberAssociations($entry_id = null, $field_id = null, $col_id =

if ( ! isset($this->cache['memberAssociations'][$cache_key])) {

if ( ! empty($group_by))
{
ee()->db->select($group_by);
}

// Return specific fields from query
if ( ! is_null($select_fields)) {
ee()->db->select($select_fields);
Expand Down Expand Up @@ -105,6 +110,11 @@ public function memberAssociations($entry_id = null, $field_id = null, $col_id =
$order_by = 'vcm.order';
}

if ( ! empty($group_by))
{
ee()->db->group_by($order_by);
}

if (isset($settings['sort']) && strtolower($settings['sort']) == 'desc') {
$sort = 'desc';
} else {
Expand Down

0 comments on commit a53a44b

Please sign in to comment.