diff options
author | millette <millette@controlyourself.ca> | 2008-11-28 16:01:14 -0500 |
---|---|---|
committer | millette <millette@controlyourself.ca> | 2008-11-28 16:01:14 -0500 |
commit | ce0883330306ccb9bd50aef4d7963351284bd698 (patch) | |
tree | 48797bd1dac83f1dd08e39a77f11540f53bed249 /actions/twitapistatuses.php | |
parent | 4fca9960cd5388ff2a12472b956e2504a5af7549 (diff) |
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
Diffstat (limited to 'actions/twitapistatuses.php')
-rw-r--r-- | actions/twitapistatuses.php | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |