Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x

* '1.0.x' of gitorious.org:statusnet/mainline:
  add conversation ID to notice output
  For fave count, don't use distinct
  Static -> static
  allow posting to groups through atompub
This commit is contained in:
Zach Copley 2011-08-27 18:47:19 -07:00
commit 500ec79e39
4 changed files with 4 additions and 3 deletions

View File

@ -447,7 +447,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
} else { } else {
$group = User_group::staticGet('uri', $uri); $group = User_group::staticGet('uri', $uri);
if (!empty($group)) { if (!empty($group)) {
$options['groups'][] = $uri; $options['groups'][] = $group->id;
} else { } else {
// @fixme: hook for discovery here // @fixme: hook for discovery here
common_log(LOG_WARNING, sprintf('AtomPub post with unknown attention URI %s', $uri)); common_log(LOG_WARNING, sprintf('AtomPub post with unknown attention URI %s', $uri));

View File

@ -778,7 +778,7 @@ class Profile extends Managed_DataObject
$faves = new Fave(); $faves = new Fave();
$faves->user_id = $this->id; $faves->user_id = $this->id;
$cnt = (int) $faves->count('distinct notice_id'); $cnt = (int) $faves->count('notice_id');
if (!empty($c)) { if (!empty($c)) {
$c->set(Cache::key('profile:fave_count:'.$this->id), $cnt); $c->set(Cache::key('profile:fave_count:'.$this->id), $cnt);

View File

@ -376,6 +376,7 @@ class ApiAction extends Action
// StatusNet-specific // StatusNet-specific
$twitter_status['statusnet_html'] = $notice->rendered; $twitter_status['statusnet_html'] = $notice->rendered;
$twitter_status['statusnet_conversation_id'] = $notice->conversation;
return $twitter_status; return $twitter_status;
} }

View File

@ -63,7 +63,7 @@ class User_openid extends Memcached_DataObject
return array(false, false, false); return array(false, false, false);
} }
Static function hasOpenID($user_id) static function hasOpenID($user_id)
{ {
$oid = new User_openid(); $oid = new User_openid();