OStatus: fix for low-level remote subscribe

This commit is contained in:
Brion Vibber 2010-02-16 20:11:48 +00:00
parent eea52c708b
commit a116cde1a4
1 changed files with 6 additions and 6 deletions

View File

@ -225,7 +225,7 @@ class Ostatus_profile extends Memcached_DataObject
try { try {
$local = $munger->profile(); $local = $munger->profile();
if ($entity->isGroup()) { if ($profile->isGroup()) {
$group = new User_group(); $group = new User_group();
$group->nickname = $local->nickname . '@remote'; // @fixme $group->nickname = $local->nickname . '@remote'; // @fixme
$group->fullname = $local->fullname; $group->fullname = $local->fullname;
@ -245,17 +245,17 @@ class Ostatus_profile extends Memcached_DataObject
$profile->profile_id = $local->id; $profile->profile_id = $local->id;
} }
$profile->created = sql_common_date(); $profile->created = common_sql_now();
$profile->lastupdate = sql_common_date(); $profile->lastupdate = common_sql_now();
$result = $profile->insert(); $result = $profile->insert();
if (empty($result)) { if (empty($result)) {
throw new FeedDBException($profile); throw new FeedDBException($profile);
} }
$entity->query('COMMIT'); $profile->query('COMMIT');
} catch (FeedDBException $e) { } catch (FeedDBException $e) {
common_log_db_error($e->obj, 'INSERT', __FILE__); common_log_db_error($e->obj, 'INSERT', __FILE__);
$entity->query('ROLLBACK'); $profile->query('ROLLBACK');
return false; return false;
} }
@ -269,7 +269,7 @@ class Ostatus_profile extends Memcached_DataObject
} }
} }
return $entity; return $profile;
} }
/** /**