This commit is contained in:
Baris Usakli
2013-07-17 10:45:16 -04:00
parent 582cd2f011
commit 8d21d4f998
3 changed files with 47 additions and 0 deletions

View File

@@ -317,6 +317,24 @@ marked.setOptions({
}
});
return; // for now, until anon code is written.
} else if(!title || title.length <= 3) {
socket.emit('event:alert', {
type: 'error',
timeout: 5000,
title: 'Title too short',
message: "Please enter a longer title.",
alert_id: 'post_error'
});
return;
} else if (!content || content.length <= 9) {
socket.emit('event:alert', {
type: 'error',
timeout: 5000,
title: 'Content too short',
message: "Please enter a longer post.",
alert_id: 'post_error'
});
return;
}
user.getUserField(uid, 'lastposttime', function(lastposttime) {