Bug1075760: reporting objectional material with no message doesn't get sent to admin with digest emails
Email digest table has a not null contraint for the message field:
1. Force the user to enter something in the objectionable comment.
2. Other areas: if a user enteres a message (i.e. in a forum)
which is made up of html (i.e. a smiley face),
the message gets 'cleaned' by stripping html tags.
This leaves it empty and fails when trying to insert into the
email digest table.
Clean the message with html2text instead of str_shorten_html.
3. As a last resort, before inserting into the email digest table,
make sure there is at least a space in the message field (if it's empty).
Reviewed: https:/ /reviews. mahara. org/2820 gitorious. org/mahara/ mahara/ commit/ bf6d4c5e6d41958 f961aff8e28e5ce 721cf6455e
Committed: http://
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.8_STABLE
commit bf6d4c5e6d41958 f961aff8e28e5ce 721cf6455e
Author: Ghada El-Zoghbi <email address hidden>
Date: Tue Nov 5 11:51:34 2013 +1100
Bug1075760: reporting objectional material with no message doesn't get sent to admin with digest emails
Email digest table has a not null contraint for the message field:
1. Force the user to enter something in the objectionable comment.
2. Other areas: if a user enteres a message (i.e. in a forum)
which is made up of html (i.e. a smiley face),
the message gets 'cleaned' by stripping html tags.
This leaves it empty and fails when trying to insert into the
email digest table.
Clean the message with html2text instead of str_shorten_html.
3. As a last resort, before inserting into the email digest table,
make sure there is at least a space in the message field (if it's empty).
Change-Id: I05a77e06820178 39b34e74241eefb 98fb788eab5
Signed-off-by: Ghada El-Zoghbi <email address hidden>