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

Fix #16423 V13 can join file AND use mail template #16488

Closed
wants to merge 2 commits into from

Conversation

daraelmin
Copy link
Contributor

#Fix #16423 can not attach email when using templatein formmail
#Fix #16420 can not use email templae un formmail

@@ -330,7 +330,7 @@ public function get_form($addfileaction = 'addfile', $removefileaction = 'remove
$langs->loadLangs(array('other', 'mails'));

// Clear temp files. Must be done at beginning, before call of triggers
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1'))
if (GETPOST('mode', 'alpha') == 'init' && (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't understand why a &. Doing that means the list of files will no more be clean whe we call the page with param mode = 'init'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unsure of that, but, on "init" shouldn't the "modelmailselected" unset or set to 0 or -1 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the list is cleared each time the mailmodelselected parameter is not set to "-1" wich is very strange to me.

eldy added a commit that referenced this pull request Feb 28, 2021
@eldy eldy closed this Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants