summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-14 11:27:22 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-14 11:27:22 -0700
commite0bdaa787ddf5102417ec35a4996e68cfc8981f2 (patch)
tree4acf850e7f15180120805b755d37825722f09267 /classes/Notice.php
parentb4e649fe906a793cd5e62d6390065ea5d41c40db (diff)
parent1c41afbd36580e2d5ad110bfb5ae0da53a7895b2 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php7
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.');