summaryrefslogtreecommitdiff
path: root/lib/facebookaction.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-21 08:23:52 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-21 08:23:52 -0400
commitd1cc159a0423c84a74ba416af2878db6186899a8 (patch)
tree07fddd2ca6c9e20db045fe57853b05ec3f48e06f /lib/facebookaction.php
parent1285c11d0a913bc1590e91de42a4335c7ac4119d (diff)
facebook action correctly checks max notice length
Diffstat (limited to 'lib/facebookaction.php')
-rw-r--r--lib/facebookaction.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/facebookaction.php b/lib/facebookaction.php
index 5be2f2fe6..08141177a 100644
--- a/lib/facebookaction.php
+++ b/lib/facebookaction.php
@@ -35,7 +35,6 @@ if (!defined('LACONICA'))
require_once INSTALLDIR.'/lib/facebookutil.php';
require_once INSTALLDIR.'/lib/noticeform.php';
-
class FacebookAction extends Action
{
@@ -201,7 +200,6 @@ class FacebookAction extends Action
}
-
// Make this into a widget later
function showLocalNav()
{
@@ -261,7 +259,6 @@ class FacebookAction extends Action
$this->endHTML();
}
-
function showInstructions()
{
@@ -287,7 +284,6 @@ class FacebookAction extends Action
$this->elementEnd('div');
}
-
function showLoginForm($msg = null)
{
@@ -332,7 +328,6 @@ class FacebookAction extends Action
}
-
function updateProfileBox($notice)
{
@@ -414,7 +409,6 @@ class FacebookAction extends Action
$this->xw->openURI('php://output');
}
-
/**
* Generate pagination links
*
@@ -473,8 +467,9 @@ class FacebookAction extends Action
} else {
$content_shortened = common_shorten_links($content);
- if (mb_strlen($content_shortened) > 140) {
- $this->showPage(_('That\'s too long. Max notice size is 140 chars.'));
+ if (Notice::contentTooLong($content_shortened)) {
+ $this->showPage(sprintf(_('That\'s too long. Max notice size is %d chars.'),
+ Notice::maxContent()));
return;
}
}