From f4518c646a588177e93a05363f07b61dce3fb563 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 1 Nov 2011 00:50:41 -0700 Subject: [PATCH] fixes to diaspora profiles, batch mode duplicates, social graph table name --- include/notifier.php | 2 +- include/profile_update.php | 4 ++-- include/socgraph.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/notifier.php b/include/notifier.php index 61274bedf0..cc53a17c42 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -710,7 +710,7 @@ function notifier_run($argv, $argc){ if($public_message) { $r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s' - AND `uid` = %d AND `rel` != %d ORDER BY rand() ", + AND `uid` = %d AND `rel` != %d group by `batch` ORDER BY rand() ", dbesc(NETWORK_DIASPORA), intval($owner['uid']), intval(CONTACT_IS_SHARING) diff --git a/include/profile_update.php b/include/profile_update.php index f2a806cfd8..bd7f678ed9 100644 --- a/include/profile_update.php +++ b/include/profile_update.php @@ -16,7 +16,7 @@ function profile_change() { // proc_run('php',"include/directory.php","$url"); $recips = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s' - AND `uid` = %d AND `rel` != %d ORDER BY rand() ", + AND `uid` = %d AND `rel` != %d group by `batch` ORDER BY rand() ", dbesc(NETWORK_DIASPORA), intval(local_user()), intval(CONTACT_IS_SHARING) @@ -101,7 +101,7 @@ function profile_change() { logger('profile_change: ' . $msg, LOGGER_ALL); foreach($recips as $recip) { - $msgtosend = diaspora_msg_build($msg,$a->user,$recip,$a->user['prvkey'],null,true); + $msgtosend = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$a->user,$recip,$a->user['prvkey'],null,true))); add_to_queue($recip['id'],NETWORK_DIASPORA,$msgtosend,true); } } diff --git a/include/socgraph.php b/include/socgraph.php index 17cf3fcd5d..3e9c00633b 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -118,7 +118,7 @@ function poco_load($cid,$uid = 0,$url = null) { } - q("delete from gcid where `cid` = %d and `uid` = %d and `updated` < UTC_TIMESTAMP - INTERVAL 2 DAY", + q("delete from glink where `cid` = %d and `uid` = %d and `updated` < UTC_TIMESTAMP - INTERVAL 2 DAY", intval($cid), intval($uid) );