X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FShareNotice%2FShareNoticePlugin.php;h=2c199efec09c2175369cc7e8a6e006171672365b;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=08362f7932c0b249e3232b8f0889294f305b4ce3;hpb=87d46e1ae5e5effcc985021ff5af3f10815f3d3c;p=quix0rs-gnu-social.git diff --git a/plugins/ShareNotice/ShareNoticePlugin.php b/plugins/ShareNotice/ShareNoticePlugin.php index 08362f7932..2c199efec0 100644 --- a/plugins/ShareNotice/ShareNoticePlugin.php +++ b/plugins/ShareNotice/ShareNoticePlugin.php @@ -32,12 +32,12 @@ class ShareNoticePlugin extends Plugin array('StatusNet', array('baseurl' => 'http://identi.ca')) ); - function onEndShowStatusNetStyles($action) { + public function onEndShowStylesheets(Action $action) { $action->cssLink($this->path('css/sharenotice.css')); return true; } - function onStartShowNoticeItem($item) + function onStartShowNoticeItem(NoticeListItem $item) { $notice = $item->notice; $out = $item->out; @@ -104,7 +104,7 @@ abstract class GenericNoticeShareTarget extends NoticeShareTarget { // TRANS: %s is notice content that is shared on Twitter, Facebook or another platform. $pattern = _m('"%s"'); - $url = $this->notice->bestUrl(); + $url = $this->notice->getUrl(); $suffix = ' ' . $url; $room = $this->maxLength() - mb_strlen($suffix) - (mb_strlen($pattern) - mb_strlen('%s')); @@ -192,7 +192,7 @@ class FacebookShareTarget extends NoticeShareTarget public function targetUrl() { $args = array( - 'u' => $this->notice->bestUrl(), + 'u' => $this->notice->getUrl(), // TRANS: %s is notice content that is shared on Twitter, Facebook or another platform. 't' => sprintf(_m('"%s"'), $this->notice->content), ); @@ -209,12 +209,12 @@ class FacebookShareTarget extends NoticeShareTarget * * @return boolean hook value */ - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $url = 'http://status.net/wiki/Plugin:ShareNotice'; $versions[] = array('name' => 'ShareNotice', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Brion Vibber', 'homepage' => $url, 'rawdescription' =>