From ce0883330306ccb9bd50aef4d7963351284bd698 Mon Sep 17 00:00:00 2001 From: millette Date: Fri, 28 Nov 2008 16:01:14 -0500 Subject: shorten urls for posts > 140 chars only, from anywhere. Only show long urls in title attributes for links we shortened ourselves. darcs-hash:20081128210114-099f7-4e4cde0a983c2ac6d41efb59b46cb7dbf45dc7a6.gz --- actions/twitapidirect_messages.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actions/twitapidirect_messages.php') diff --git a/actions/twitapidirect_messages.php b/actions/twitapidirect_messages.php index a04ae5fa7..a14a9e567 100644 --- a/actions/twitapidirect_messages.php +++ b/actions/twitapidirect_messages.php @@ -115,8 +115,8 @@ class Twitapidirect_messagesAction extends TwitterapiAction { $this->client_error(_('No message text!'), $code = 406, $apidata['content-type']); // } else if (mb_strlen($status) > 140) { } else { - $status = common_shorten_links($status); - if (mb_strlen($status) > 140) { + $content_shortened = common_shorten_links($content); + if (mb_strlen($content_shortened) > 140) { $this->client_error(_('That\'s too long. Max message size is 140 chars.'), $code = 406, $apidata['content-type']); return; -- cgit v1.2.3-54-g00ecf