]> git.mxchange.org Git - friendica.git/commitdiff
fixes to diaspora profiles, batch mode duplicates, social graph table name
authorFriendika <info@friendika.com>
Tue, 1 Nov 2011 07:50:41 +0000 (00:50 -0700)
committerFriendika <info@friendika.com>
Tue, 1 Nov 2011 07:50:41 +0000 (00:50 -0700)
include/notifier.php
include/profile_update.php
include/socgraph.php

index 61274bedf04b1935788dff6876cca93a7d94c974..cc53a17c421ff6a86bdbb8205e4306e764c1b83a 100644 (file)
@@ -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)
index f2a806cfd87fe9378a3c35d0782719a661a67c94..bd7f678ed9aea94d7cb915a9c5cd3b7d57a135ce 100644 (file)
@@ -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);
        }
 }
index 17cf3fcd5d9cf8597949977706c2379d115ea411..3e9c00633b78f2cd975da1ae93c7604502c84dc2 100644 (file)
@@ -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)
        );