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/twitapistatuses.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actions/twitapistatuses.php') diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php index 6d6d5266f..947d21032 100644 --- a/actions/twitapistatuses.php +++ b/actions/twitapistatuses.php @@ -255,9 +255,9 @@ class TwitapistatusesAction extends TwitterapiAction { // } else if (mb_strlen($status) > 140) { } else { - $status = common_shorten_links($status); + $status_shortened = common_shorten_links($status); - if (mb_strlen($status) > 140) { + if (mb_strlen($status_shortened) > 140) { // XXX: Twitter truncates anything over 140, flags the status // as "truncated." Sending this error may screw up some clients @@ -271,7 +271,7 @@ class TwitapistatusesAction extends TwitterapiAction { // Check for commands $inter = new CommandInterpreter(); - $cmd = $inter->handle_command($user, $status); + $cmd = $inter->handle_command($user, $status_shortened); if ($cmd) { -- cgit v1.2.3-54-g00ecf