diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-14 11:27:22 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-14 11:27:22 -0700 |
commit | e0bdaa787ddf5102417ec35a4996e68cfc8981f2 (patch) | |
tree | 4acf850e7f15180120805b755d37825722f09267 /classes/Notice.php | |
parent | b4e649fe906a793cd5e62d6390065ea5d41c40db (diff) | |
parent | 1c41afbd36580e2d5ad110bfb5ae0da53a7895b2 (diff) |
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 1c4858149..78786b27d 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -125,7 +125,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.'); |