diff options
Diffstat (limited to 'actions/newnotice.php')
-rw-r--r-- | actions/newnotice.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php index fed3278a4..5bbc91531 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -49,7 +49,14 @@ class NewnoticeAction extends Action { $notice->profile_id = $user->id; # user id *is* profile id $notice->created = DB_DataObject_Cast::dateTime(); $notice->content = trim($this->arg('content')); - return $notice->insert(); + + $val = $notice->validate(); + if ($val === TRUE) { + return $notice->insert(); + } else { + // XXX: display some info + return NULL; + } } function show_form() { |