Closed (fixed)
Project:
Privatemsg
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2009 at 00:49 UTC
Updated:
5 Mar 2009 at 21:10 UTC
Jump to comment: Most recent file
Perhaps this shuld be coupled with a variable ?
if (empty($message['subject'])) {
such as :
if (!variable_get('pmsg_allow_empty_subject', FALSE) && empty($message['subject'])) {
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | privatemsg.empty_subject2.patch | 1.72 KB | berdir |
| #1 | privatemsg.empty_subject.patch | 2.35 KB | berdir |
Comments
Comment #1
berdir- Added a configuration setting to allow empty subjects
- If set to yes, empty subjects are automatically filled with the first 20 characters of the body
- Only for users, api functions aren't changed.. They should always send a subject, because they don't know if it is allowed or not
- We need a subject to display the list and so on, so the validate function itself hasn't changed, it still checks for a non-empty subject
Question
- I made the body required for now, should that be configurable too ? We need atleast either the subject or the body.
Comment #2
berdirUpdated patch:
- removed configuration settings as discussed in irc
- removed body check in validate function
- If subject is empty and body is not, subject gets prefilled with the first 20 text-chars (html tags removed) of the body
- If both subject and body are empty, it fails with a message that subject is needed.
Comment #3
litwol commentedCommited with minor change.