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

get correct update_field param if multiple plugins #2241

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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: 5 additions & 3 deletions plugins/fabrik_form/email/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public function onAfterProcess()
$message = $this->_getTextEmail();
}

$this->attachments = array(); //Reset in case of multiple email plugins
$this->addAttachments();

$cc = null;
Expand Down Expand Up @@ -426,7 +427,7 @@ public function onAfterProcess()
}
}

$this->updateRow();
$this->updateRow($params);

JDEBUG ? $profiler->mark("email: end: onAfterProcess") : null;

Expand Down Expand Up @@ -843,9 +844,10 @@ protected function _getTextEmail()
/**
* Update row
*/
private function updateRow()
private function updateRow($params)
{
$params = $this->getParams();
//$$$trob: in case of multiple email plugins getParams is fetching the "last" ones for the first email plugin
//$params = $this->getParams();
$updateField = $params->get('email_update_field');
$rowid = $this->data['rowid'];

Expand Down