]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge remote-tracking branch 'origin'
authorEvan Prodromou <evan@status.net>
Mon, 9 Jul 2012 13:33:42 +0000 (09:33 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 9 Jul 2012 13:33:42 +0000 (09:33 -0400)
lib/jsonsearchresultslist.php
plugins/Realtime/RealtimePlugin.php
plugins/TwitterBridge/daemons/twitterdaemon.php
plugins/TwitterBridge/twitterstreamreader.php

index 8bf3678d4fa12fc5fad55d875b55c8985b3e2fe4..c9b2705991f91e262f9ce53690f97e45c28d6754 100644 (file)
@@ -232,10 +232,15 @@ class ResultItem
         $this->id           = $this->notice->id;
         $this->from_user_id = $this->profile->id;
 
-        $user = User::staticGet('id', $this->profile->id);
-
-        $this->iso_language_code = $user->language;
+        $user = $this->profile->getUser();
 
+        if (empty($user)) {
+            // Gonna have to do till we can detect it
+            $this->iso_language_code = common_config('site', 'language');
+        } else {
+            $this->iso_language_code = $user->language;
+        }
+        
         $this->source = $this->getSourceLink($this->notice->source);
 
         $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
index 5eb23fb62787e3477f6d13fa19eb2005efc104c5..0fa51ce8612372eac33e2c34fa3010932f8bc9b8 100644 (file)
@@ -253,7 +253,9 @@ class RealtimePlugin extends Plugin
                 list($action, $arg1, $arg2) = $path;
 
                 $channels = Realtime_channel::getAllChannels($action, $arg1, $arg2);
-                $this->log(LOG_INFO, sprintf(_("%d candidate channels for notice %d"), $notice->id));
+                $this->log(LOG_INFO, sprintf(_("%d candidate channels for notice %d"),
+                                             count($channels), 
+                                             $notice->id));
 
                 foreach ($channels as $channel) {
 
index d313d2de96cbca168654881fc715291112ae97f9..8b774889d19722214cea7595862bd8e8eb48359e 100644 (file)
@@ -23,7 +23,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
 $shortoptions = 'fi::a';
 $longoptions = array('id::', 'foreground', 'all');
 
-$helptext = <<<END_OF_XMPP_HELP
+$helptext = <<<END_OF_TWITTERDAEMON_HELP
 Daemon script for receiving new notices from Twitter users.
 
     -i --id           Identity (default none)
@@ -31,12 +31,10 @@ Daemon script for receiving new notices from Twitter users.
                       (requires Stomp queue handler, status_network setup)
     -f --foreground   Stay in the foreground (default background)
 
-END_OF_XMPP_HELP;
+END_OF_TWITTERDAEMON_HELP;
 
 require_once INSTALLDIR.'/scripts/commandline.inc';
 
-require_once INSTALLDIR . '/lib/jabber.php';
-
 class TwitterDaemon extends SpawningDaemon
 {
     protected $allsites = false;
index f55fca40ae8201523c7e4f6b89c57810c8649eba..2441b1335700289ab822ac34238182eebe324b1a 100644 (file)
@@ -208,7 +208,7 @@ class TwitterSiteStream extends TwitterStreamReader
 {
     protected $userIds;
 
-    public function __construct(TwitterOAuthClient $auth, $baseUrl='http://betastream.twitter.com')
+    public function __construct(TwitterOAuthClient $auth, $baseUrl='https://sitestream.twitter.com')
     {
         parent::__construct($auth, $baseUrl);
     }