Not sure if this is a bug or a feature, but if a field in the messaging_admin_message_form is empty the empty value is not saved in the database because of the conditional
if ($text = trim($text)) {
I'm sure there are cases where people would prefer nothing instead of a default value. I'd be glad to submit a patch, but I wanted to check to see what the thinking was here before doing so.
andre
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | messagingTrimPatch.patch | 720 bytes | mehmeta |
Comments
Comment #1
jose reyero commentedI think the feature makes sense so such patch would be welcomed.
However it is not that trivial because right now we have a fall-back system, so if you have not specified a message part for a sending method, it will default to the 'default' method's message part.
So I guess we'll need a special text like '', a checkbox or similar...
Comment #2
jose reyero commentedAdded this feature, see new help texts on the page. ('')
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
mehmeta commentedThe same line:
if ($text = trim($text)) {
causes the new line characters to be filtered out as well. Is that trim really necessary?
Comment #5
jose reyero commentedYes, you're right, we don't want to trim the submitted template
(but we want to check it is not only spaces and/or new lines)
So applied something similar
if (trim($text)) // Checks not empty but doesn't change the actual text saved.