From b135a51d6a1abb05e5b439496441d09467ca518d Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 4 Mar 2015 12:52:43 +0100 Subject: [PATCH] ->url to ->getUrl() for File_thumbnail and Notice In older versions ->getUrl() actually just returns ->url, but newer versions of GNU social have some logic which takes care of certain issues with outdated URLs stored in the database tables etc. --- QvitterPlugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 0c9a0c8..ae913d5 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -501,9 +501,9 @@ class QvitterPlugin extends Plugin { $attachment_url_to_id[$enclosure_o->url]['thumb_url'] = $thumb->getUrl(); } catch (ServerException $e) { $thumb = File_thumbnail::getKV('file_id', $attachment->id); - if(isset($thumb->url)) { + if ($thumb instanceof File_thumbnail) { $attachment_url_to_id[$enclosure_o->url]['id'] = $attachment->id; - $attachment_url_to_id[$enclosure_o->url]['thumb_url'] = $thumb->url; + $attachment_url_to_id[$enclosure_o->url]['thumb_url'] = $thumb->getUrl(); } } } @@ -543,7 +543,7 @@ class QvitterPlugin extends Plugin { } else { $twitter_status['is_local'] = false; - $twitter_status['external_url'] = $notice->url; + $twitter_status['external_url'] = $notice->getUrl(); } if($notice->object_type == 'activity') { $twitter_status['is_activity'] = true;