-
-
Notifications
You must be signed in to change notification settings - Fork 824
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#1784 fix regression on restore contacts button not working. #17418
Conversation
This should fix https://lab.civicrm.org/dev/core/-/issues/1784 I think the message from deleting multiple contacts is a bit wonky, but no worse
(Standard links)
|
$session = CRM_Core_Session::singleton(); | ||
$currentUserId = $session->get('userID'); | ||
|
||
$context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this, FALSE, 'basic'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All moved to $this->setRedirection()
@@ -228,15 +212,7 @@ public function postProcess() { | |||
} | |||
if ($deleted) { | |||
$title = ts('Deleted'); | |||
if ($this->_restore) { | |||
$title = ts('Restored'); | |||
$status = ts('%1 has been restored from the trash.', [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems wrong for multiple contacts but should be no worse for this PR (it might be an empty name rather than a random one but not sure that is worse)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works because of the 'plural' and 'count' params to ts(). You don't see it that much - came from Drupal I think.
Thanks! Will take a look. |
|
@demeritcowboy thanks for the review - no new concerns + fixes regression from above so I have merged |
Overview
This should fix https://lab.civicrm.org/dev/core/-/issues/1784
I think the message from deleting multiple contacts is a bit wonky, but no worse
Before
Contact not restored
After
Contact restored
Technical Details
@demeritcowboy
Comments