diff options
author | Evan Prodromou <evan@status.net> | 2009-09-23 09:45:22 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-09-23 09:45:22 -0400 |
commit | 8284b3cb82f4dec6e0f2bf74dea6e1a3bc7f4eac (patch) | |
tree | 09b8c466df2476f9219550464eb73f6ecaa54e1c /lib/util.php | |
parent | 2cabfba767ba0d92d34a6ea4e4cf91c7325f3e95 (diff) | |
parent | bef4a8b6ba9e19f2ec629031444279ca76f17bcf (diff) |
Merge branch '0.8.x' into 0.9.x
Conflicts:
actions/requesttoken.php
classes/File.php
install.php
lib/noticeform.php
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/util.php b/lib/util.php index 441dcf68e..56753debe 100644 --- a/lib/util.php +++ b/lib/util.php @@ -442,9 +442,9 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) { ')'. '(?:'. '(?:\:\d+)?'. //:port - '(?:/[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"]*)?'. // /path - '(?:\?[\pN\pL\$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"\/]*)?'. // ?query string - '(?:\#[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"\/\?\#]*)?'. // #fragment + '(?:/[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"@]*)?'. // /path + '(?:\?[\pN\pL\$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"@\/]*)?'. // ?query string + '(?:\#[\pN\pL$\[\]\,\!\(\)\.\:\-\_\+\/\=\&\;\%\~\*\$\+\'\"\@/\?\#]*)?'. // #fragment ')(?<![\?\.\,\#\,])'. ')'. '#ixu'; @@ -552,12 +552,13 @@ function common_linkify($url) { } if (!empty($f)) { - if (isset($f->filename)) { + if ($f->isEnclosure()) { $is_attachment = true; $attachment_id = $f->id; - } else { // if it has OEmbed info, it's an attachment, too + } else { $foe = File_oembed::staticGet('file_id', $f->id); if (!empty($foe)) { + // if it has OEmbed info, it's an attachment, too $is_attachment = true; $attachment_id = $f->id; @@ -1393,9 +1394,6 @@ function common_shorten_url($long_url) $short_url_service = $reflectionObj->newInstanceArgs($_shorteners[$svc]['callInfo'][1]); $short_url = $short_url_service->shorten($long_url); - if(substr($short_url,0,7)=='http://'){ - $short_url = substr($short_url,7); - } return $short_url; } |