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

dev/core#1217 Fix for failure to respect event_id (or any?) criteria … #16318

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions CRM/Event/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ public function postProcess() {
}

$this->_done = TRUE;
$formValues = $this->getFormValues();
$this->setFormValues();

$this->submit($formValues);
$this->submit($this->_formValues);
}

/**
Expand Down Expand Up @@ -465,8 +465,8 @@ protected function setSearchMetadata() {
* the default array reference
*/
public function setDefaultValues() {
parent::setDefaultValues();
return $this->_formValues;
$this->_defaults = array_merge(parent::setDefaultValues(), (array) $this->_formValues);
return $this->_defaults;
}

}
4 changes: 1 addition & 3 deletions CRM/Event/Form/Task/SaveSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@ public function postProcess() {
// saved search form values
$formValues = $this->controller->exportValues();

$session = CRM_Core_Session::singleton();

//save the search
$savedSearch = new CRM_Contact_BAO_SavedSearch();
$savedSearch->id = $this->_id;
$savedSearch->form_values = serialize($this->get('formValues'));
$savedSearch->form_values = serialize($this->get('queryParams'));
$savedSearch->save();
$this->set('ssID', $savedSearch->id);
CRM_Core_Session::setStatus(ts("Your smart group has been saved as '%1'.", [1 => $formValues['title']]), ts('Saved'), 'success');
Expand Down