$this->_task = $values['task'];
- $ids = [];
- if ($values['radio_ts'] == 'ts_sel') {
- foreach ($values as $name => $value) {
- if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) {
- $ids[] = substr($name, CRM_Core_Form::CB_PREFIX_LEN);
- }
- }
- }
- else {
+ $ids = $this->getSelectedIDs($values);
+
+ if (!$ids) {
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$cacheKey = "civicrm search {$qfKey}";
$allCids = Civi::service('prevnext')->getSelection($cacheKey, "getall");