aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-07 12:51:06 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-07 12:51:06 +0000
commit36a5a0e606641920728b27f179020461023667e8 (patch)
treea82b30fb8129a7e8bc75398432aef6e120285916 /actions
parent450a54397f61f2fe53c8638459aad7ba9bc1c069 (diff)
downloadelgg-36a5a0e606641920728b27f179020461023667e8.tar.gz
elgg-36a5a0e606641920728b27f179020461023667e8.tar.bz2
fixes #1018 - blank comments are now rejected
git-svn-id: http://code.elgg.org/elgg/trunk@3737 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions')
-rw-r--r--actions/comments/add.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/comments/add.php b/actions/comments/add.php
index 62fc2d0e0..4d01fe1b0 100644
--- a/actions/comments/add.php
+++ b/actions/comments/add.php
@@ -15,6 +15,12 @@ action_gatekeeper();
$entity_guid = (int) get_input('entity_guid');
$comment_text = get_input('generic_comment');
+// make sure comment is not empty
+if (empty($comment_text)) {
+ register_error(elgg_echo("generic_comment:blank"));
+ forward($_SERVER['HTTP_REFERER']);
+}
+
// Let's see if we can get an entity with the specified GUID
if ($entity = get_entity($entity_guid)) {