]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Realtime/RealtimePlugin.php
Merge branch '0.9-release'
[quix0rs-gnu-social.git] / plugins / Realtime / RealtimePlugin.php
index c5fb6de038fa7cc83a9f6a367a9c53b01261e914..198cb5ad71395827057ec44e46ac9e7b8d7491e3 100644 (file)
@@ -139,8 +139,8 @@ class RealtimePlugin extends Plugin
 
         // Add to the public timeline
 
-        if ($notice->is_local ||
-            ($notice->is_local == 0 && !common_config('public', 'localonly'))) {
+        if ($notice->is_local == Notice::LOCAL_PUBLIC ||
+            ($notice->is_local == Notice::REMOTE_OMB && !common_config('public', 'localonly'))) {
             $paths[] = array('public');
         }
 
@@ -237,7 +237,6 @@ class RealtimePlugin extends Plugin
         }
 
         $action->showContentBlock();
-        $action->showScripts();
         $action->elementEnd('body');
         return false; // No default processing
     }
@@ -247,13 +246,13 @@ class RealtimePlugin extends Plugin
         // FIXME: this code should be abstracted to a neutral third
         // party, like Notice::asJson(). I'm not sure of the ethics
         // of refactoring from within a plugin, so I'm just abusing
-        // the ApiAction method. Don't do this unless you're me!
+        // the TwitterApiAction method. Don't do this unless you're me!
 
-        require_once(INSTALLDIR.'/lib/api.php');
+        require_once(INSTALLDIR.'/lib/twitterapi.php');
 
-        $act = new ApiAction('/dev/null');
+        $act = new TwitterApiAction('/dev/null');
 
-        $arr = $act->twitterStatusArray($notice, true);
+        $arr = $act->twitter_status_array($notice, true);
         $arr['url'] = $notice->bestUrl();
         $arr['html'] = htmlspecialchars($notice->rendered);
         $arr['source'] = htmlspecialchars($arr['source']);