fix profile update propagation
This commit is contained in:
parent
c0cc494bf3
commit
6220ab4b54
@ -19,11 +19,6 @@ function directory_run($argv, $argc){
|
|||||||
if($dirmode === false)
|
if($dirmode === false)
|
||||||
$dirmode = DIRECTORY_MODE_NORMAL;
|
$dirmode = DIRECTORY_MODE_NORMAL;
|
||||||
|
|
||||||
if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) {
|
|
||||||
syncdirs($argv[1]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$x = q("select * from channel where channel_id = %d limit 1",
|
$x = q("select * from channel where channel_id = %d limit 1",
|
||||||
intval($argv[1])
|
intval($argv[1])
|
||||||
);
|
);
|
||||||
@ -32,6 +27,15 @@ function directory_run($argv, $argc){
|
|||||||
|
|
||||||
$channel = $x[0];
|
$channel = $x[0];
|
||||||
|
|
||||||
|
|
||||||
|
if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) {
|
||||||
|
syncdirs($argv[1]);
|
||||||
|
|
||||||
|
// Now update all the connections
|
||||||
|
proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$directory = find_upstream_directory($dirmode);
|
$directory = find_upstream_directory($dirmode);
|
||||||
|
|
||||||
if($directory) {
|
if($directory) {
|
||||||
@ -49,7 +53,7 @@ function directory_run($argv, $argc){
|
|||||||
|
|
||||||
// Now update all the connections
|
// Now update all the connections
|
||||||
|
|
||||||
proc_run('php','notifier','refresh_all',$channel['channel_id']);
|
proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +189,7 @@ function notifier_run($argv, $argc){
|
|||||||
$item = $suggest[0];
|
$item = $suggest[0];
|
||||||
}
|
}
|
||||||
elseif($cmd === 'refresh_all') {
|
elseif($cmd === 'refresh_all') {
|
||||||
|
logger('notifier: refresh_all: ' . $item_id);
|
||||||
$s = q("select * from channel where channel_id = %d limit 1",
|
$s = q("select * from channel where channel_id = %d limit 1",
|
||||||
intval($item_id)
|
intval($item_id)
|
||||||
);
|
);
|
||||||
@ -196,10 +197,9 @@ function notifier_run($argv, $argc){
|
|||||||
$channel = $s[0];
|
$channel = $s[0];
|
||||||
$uid = $item_id;
|
$uid = $item_id;
|
||||||
$recipients = array();
|
$recipients = array();
|
||||||
$r = q("select * from abook where abook_channel = %d and not (abook_flags & %d) and not (abook_flags & %d)",
|
$r = q("select * from abook where abook_channel = %d and not (abook_flags & %d)",
|
||||||
intval($item_id),
|
intval($item_id),
|
||||||
intval(ABOOK_FLAG_SELF),
|
intval(ABOOK_FLAG_SELF)
|
||||||
intval(ABOOK_FLAG_PENDING)
|
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
Reference in New Issue
Block a user