push length check to Notice class

This commit is contained in:
Evan Prodromou 2009-06-12 09:47:57 -07:00
parent 1a077b0a7f
commit ce6285d0fc

View File

@ -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.');