),
array(
'name' => ts('Status'),
- 'sort' => 'status_id',
+ 'sort' => 'activity_status',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
),
array(
'name' => ts('Case Type'),
- 'sort' => 'case_type_id',
+ 'sort' => 'case_type',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
$selectedContactIds = array();
$qfKeyParam = CRM_Utils_Array::value('qfKey', $this->_formValues);
// We use ajax to handle selections only if the search results component_mode is set to "contacts"
- if ($qfKeyParam && $this->get('component_mode') <= 1) {
+ if ($qfKeyParam && ($this->get('component_mode') <= 1 || $this->get('component_mode') == 7)) {
$this->addClass('crm-ajax-selection-form');
$qfKeyParam = "civicrm search {$qfKeyParam}";
$selectedContactIdsArr = CRM_Core_BAO_PrevNextCache::getSelection($qfKeyParam);
array(
array(
'name' => ts('Type'),
- 'sort' => 'financial_type_id',
+ 'sort' => 'financial_type',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
),
array(
'name' => ts('Status'),
- 'sort' => 'contribution_status_id',
+ 'sort' => 'contribution_status',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
),
array(
'name' => ts('Fee Level'),
- 'sort' => 'fee_level',
+ 'sort' => 'participant_fee_level',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
'name' => ts('Amount'),
- 'sort' => 'fee_amount',
+ 'sort' => 'participant_fee_amount',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
FALSE, TRUE, TRUE, NULL, $queryOperator
);
+ //sort by state
+ //CRM-15301
+ $query->_sort = $order;
list($select, $from, $where, $having) = $query->query();
if ($mergeSameHousehold == 1) {
$groupBy = " GROUP BY civicrm_activity.id ";
}
$queryString .= $groupBy;
+
+ // always add contact_a.id to the ORDER clause
+ // so the order is deterministic
+ //CRM-15301
+ if (strpos('contact_a.id', $order) === FALSE) {
+ $order .= ", contact_a.id";
+ }
+
if ($order) {
list($field, $dir) = explode(' ', $order, 2);
$field = trim($field);
if (!empty($returnProperties[$field])) {
- // $queryString .= " ORDER BY $order";
+ //CRM-15301
+ $queryString .= " ORDER BY $order";
}
}
self::$_columnHeaders = array(
array(
'name' => ts('Type'),
- 'sort' => 'membership_type_id',
+ 'sort' => 'membership_type',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array('name' => ts('Member Since'),
),
array(
'name' => ts('Status'),
- 'sort' => 'status_id',
+ 'sort' => 'membership_status',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(