forked from GNUsocial/gnu-social
push length check to Notice class
This commit is contained in:
parent
1a077b0a7f
commit
ce6285d0fc
@ -123,7 +123,12 @@ class Notice extends Memcached_DataObject
|
||||
|
||||
$profile = Profile::staticGet($profile_id);
|
||||
|
||||
$final = common_shorten_links($content);
|
||||
$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.');
|
||||
|
Loading…
Reference in New Issue
Block a user