Merge remote-tracking branch 'origin'

This commit is contained in:
Evan Prodromou 2012-07-09 09:33:42 -04:00
commit dad72cce28
4 changed files with 14 additions and 9 deletions

View File

@ -232,9 +232,14 @@ class ResultItem
$this->id = $this->notice->id; $this->id = $this->notice->id;
$this->from_user_id = $this->profile->id; $this->from_user_id = $this->profile->id;
$user = User::staticGet('id', $this->profile->id); $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->iso_language_code = $user->language;
}
$this->source = $this->getSourceLink($this->notice->source); $this->source = $this->getSourceLink($this->notice->source);

View File

@ -253,7 +253,9 @@ class RealtimePlugin extends Plugin
list($action, $arg1, $arg2) = $path; list($action, $arg1, $arg2) = $path;
$channels = Realtime_channel::getAllChannels($action, $arg1, $arg2); $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) { foreach ($channels as $channel) {

View File

@ -23,7 +23,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
$shortoptions = 'fi::a'; $shortoptions = 'fi::a';
$longoptions = array('id::', 'foreground', 'all'); $longoptions = array('id::', 'foreground', 'all');
$helptext = <<<END_OF_XMPP_HELP $helptext = <<<END_OF_TWITTERDAEMON_HELP
Daemon script for receiving new notices from Twitter users. Daemon script for receiving new notices from Twitter users.
-i --id Identity (default none) -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) (requires Stomp queue handler, status_network setup)
-f --foreground Stay in the foreground (default background) -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.'/scripts/commandline.inc';
require_once INSTALLDIR . '/lib/jabber.php';
class TwitterDaemon extends SpawningDaemon class TwitterDaemon extends SpawningDaemon
{ {
protected $allsites = false; protected $allsites = false;

View File

@ -208,7 +208,7 @@ class TwitterSiteStream extends TwitterStreamReader
{ {
protected $userIds; 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); parent::__construct($auth, $baseUrl);
} }