Notice URIs are not necessarily URLs.

Let's use getUrl() for URL retrieval. May throw exceptions, but
only if it's a Notice that cannot be linked like that anyway.
This commit is contained in:
Mikael Nordfeldth
2014-04-30 20:44:23 +02:00
parent 1acffa9c7a
commit b77a09fdee
7 changed files with 8 additions and 8 deletions

View File

@@ -379,7 +379,7 @@ function format_status($notice)
// Twitter still has a 140-char hardcoded max.
if (mb_strlen($statustxt) > 140) {
$noticeUrl = common_shorten_url($notice->uri);
$noticeUrl = common_shorten_url($notice->getUrl());
$urlLen = mb_strlen($noticeUrl);
$statustxt = mb_substr($statustxt, 0, 140 - ($urlLen + 3)) . ' … ' . $noticeUrl;
}