push length check to Notice class
This commit is contained in:
parent
1a077b0a7f
commit
ce6285d0fc
|
@ -125,6 +125,11 @@ class Notice extends Memcached_DataObject
|
|||
|
||||
$final = common_shorten_links($content);
|
||||
|
||||
if (mb_strlen($final) > 140) {
|
||||
common_log(LOG_INFO, 'Rejecting notice that is too long.');
|
||||
return _('Problem saving notice. Too long.');
|
||||
}
|
||||
|
||||
if (!$profile) {
|
||||
common_log(LOG_ERR, 'Problem saving notice. Unknown user.');
|
||||
return _('Problem saving notice. Unknown user.');
|
||||
|
|
Loading…
Reference in New Issue
Block a user