]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Linkback/LinkbackPlugin.php
Type-aware comparison is necessary for Notice is_local/scope
[quix0rs-gnu-social.git] / plugins / Linkback / LinkbackPlugin.php
index 5cc4aadb051ede166f2b72a2141043bac46c8d21..0bbd55d43a6c515d55dc77568df4adbad68c0c01 100644 (file)
@@ -60,7 +60,7 @@ class LinkbackPlugin extends Plugin
 
     function onHandleQueuedNotice($notice)
     {
-        if ($notice->is_local == 1) {
+        if (intval($notice->is_local) === Notice::LOCAL_PUBLIC) {
             // Try to avoid actually mucking with the
             // notice content
             $c = $notice->content;
@@ -207,7 +207,7 @@ class LinkbackPlugin extends Plugin
                                          $profile->nickname,
                                          common_exact_date($this->notice->created)),
                       'excerpt' => $this->notice->content,
-                      'url' => $this->notice->uri,
+                      'url' => $this->notice->getUrl(),
                       'blog_name' => $profile->nickname);
 
         $fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
@@ -227,13 +227,12 @@ class LinkbackPlugin extends Plugin
         }
     }
 
-    function userAgent()
+    public function version()
     {
-        return 'LinkbackPlugin/'.LINKBACKPLUGIN_VERSION .
-          ' StatusNet/' . STATUSNET_VERSION;
+        return LINKBACKPLUGIN_VERSION;
     }
 
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array('name' => 'Linkback',
                             'version' => LINKBACKPLUGIN_VERSION,