Only some code beautification. No functional changes.

This commit is contained in:
Michael Vogel 2014-03-20 18:46:01 +01:00
parent eaa05a9203
commit 2a21fecd79
2 changed files with 7 additions and 8 deletions

View file

@ -366,7 +366,6 @@ function delivery_run(&$argv, &$argc){
break; break;
case NETWORK_OSTATUS : case NETWORK_OSTATUS :
// Do not send to otatus if we are not configured to send to public networks // Do not send to otatus if we are not configured to send to public networks
if($owner['prvnets']) if($owner['prvnets'])
break; break;
@ -386,7 +385,7 @@ function delivery_run(&$argv, &$argc){
// private emails may be in included in public conversations. Filter them. // private emails may be in included in public conversations. Filter them.
if(($public_message) && $item['private'] == 1) if(($public_message) && $item['private'] == 1)
continue; continue;
$item_contact = get_item_contact($item,$icontacts); $item_contact = get_item_contact($item,$icontacts);
if(! $item_contact) if(! $item_contact)
continue; continue;

View file

@ -696,6 +696,7 @@ function notifier_run(&$argv, &$argc){
// Do not send to ostatus if we are not configured to send to public networks // Do not send to ostatus if we are not configured to send to public networks
if($owner['prvnets']) if($owner['prvnets'])
break; break;
if(get_config('system','ostatus_disabled') || get_config('system','dfrn_only')) if(get_config('system','ostatus_disabled') || get_config('system','dfrn_only'))
break; break;
@ -707,8 +708,7 @@ function notifier_run(&$argv, &$argc){
// queue message for redelivery // queue message for redelivery
add_to_queue($contact['id'],NETWORK_OSTATUS,$slap); add_to_queue($contact['id'],NETWORK_OSTATUS,$slap);
} }
} } else {
else {
// only send salmon if public - e.g. if it's ok to notify // only send salmon if public - e.g. if it's ok to notify
// a public hub, it's ok to send a salmon // a public hub, it's ok to send a salmon
@ -847,7 +847,7 @@ function notifier_run(&$argv, &$argc){
if(! $contact['pubkey']) if(! $contact['pubkey'])
break; break;
if($target_item['verb'] === ACTIVITY_DISLIKE) { if($target_item['verb'] === ACTIVITY_DISLIKE) {
// unsupported // unsupported
break; break;
@ -906,14 +906,14 @@ function notifier_run(&$argv, &$argc){
if($public_message) { if($public_message) {
$r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s' $r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s'
AND `uid` = %d AND `rel` != %d group by `batch` ORDER BY rand() ", AND `uid` = %d AND `rel` != %d group by `batch` ORDER BY rand() ",
dbesc(NETWORK_DIASPORA), dbesc(NETWORK_DIASPORA),
intval($owner['uid']), intval($owner['uid']),
intval(CONTACT_IS_SHARING) intval(CONTACT_IS_SHARING)
); );
$r2 = q("SELECT `id`, `name`,`network` FROM `contact` $r2 = q("SELECT `id`, `name`,`network` FROM `contact`
WHERE `network` in ( '%s', '%s') AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 WHERE `network` in ( '%s', '%s') AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0
AND `rel` != %d order by rand() ", AND `rel` != %d order by rand() ",
dbesc(NETWORK_DFRN), dbesc(NETWORK_DFRN),