turn registration code into a standalone function for re-use

This commit is contained in:
friendica
2012-05-31 19:06:17 -07:00
parent 598fc1ae21
commit 93bc29a711
5 changed files with 494 additions and 436 deletions

View File

@@ -2059,8 +2059,8 @@ function diaspora_send_followup($item,$owner,$contact,$public_batch = false) {
// return the items ordered by `item`.`id`, in which case the wrong item is chosen as the parent.
// The only item with `parent` and `id` as the parent id is the parent item.
$p = q("select guid from item where parent = %d and id = %d limit 1",
$item['parent'],
$item['parent']
intval($item['parent']),
intval($item['parent'])
);
if(count($p))
$parent_guid = $p[0]['guid'];
@@ -2119,8 +2119,8 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
// return the items ordered by `item`.`id`, in which case the wrong item is chosen as the parent.
// The only item with `parent` and `id` as the parent id is the parent item.
$p = q("select guid from item where parent = %d and id = %d limit 1",
$item['parent'],
$item['parent']
intval($item['parent']),
intval($item['parent'])
);
if(count($p))
$parent_guid = $p[0]['guid'];