X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnotifier.php;h=d7e8a9ccec5a6760cf380de608ad0d8929f39c15;hb=06815f1a38409e45b0c5e5184c081f964ec89e47;hp=a5f378a55c21d1e6900bf7c8d4ed1306be92884a;hpb=4f70682f7ad272543c08d0d46b8554590caa1a30;p=friendica.git diff --git a/include/notifier.php b/include/notifier.php index a5f378a55c..d7e8a9ccec 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -165,7 +165,7 @@ function notifier_run(&$argv, &$argc){ $recipients_relocate = q("SELECT * FROM contact WHERE uid = %d AND self = 0 AND network = '%s'" , intval($uid), NETWORK_DFRN); } else { // find ancestors - $r = q("SELECT * FROM `item` WHERE `id` = %d and visible = 1 and moderated = 0 LIMIT 1", + $r = q("SELECT * FROM `item` WHERE `id` = %d AND visible = 1 AND moderated = 0 LIMIT 1", intval($item_id) ); @@ -179,7 +179,7 @@ function notifier_run(&$argv, &$argc){ $updated = $r[0]['edited']; $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer` - FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d and visible = 1 and moderated = 0 ORDER BY `id` ASC", + FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible = 1 AND moderated = 0 ORDER BY `id` ASC", intval($parent_id) ); @@ -308,13 +308,13 @@ function notifier_run(&$argv, &$argc){ $recipients = array($parent['contact-id']); $recipients_followup = array($parent['contact-id']); - //if (!$target_item['private'] AND $target_item['wall'] AND - if (!$target_item['private'] AND + //if (!$target_item['private'] && $target_item['wall'] && + if (!$target_item['private'] && (strlen($target_item['allow_cid'].$target_item['allow_gid']. $target_item['deny_cid'].$target_item['deny_gid']) == 0)) $push_notify = true; - if (($thr_parent AND ($thr_parent[0]['network'] == NETWORK_OSTATUS)) OR ($parent['network'] == NETWORK_OSTATUS)) { + if (($thr_parent && ($thr_parent[0]['network'] == NETWORK_OSTATUS)) || ($parent['network'] == NETWORK_OSTATUS)) { $push_notify = true; @@ -398,7 +398,7 @@ function notifier_run(&$argv, &$argc){ // If the thread parent is OStatus then do some magic to distribute the messages. // We have not only to look at the parent, since it could be a Friendica thread. - if (($thr_parent AND ($thr_parent[0]['network'] == NETWORK_OSTATUS)) OR ($parent['network'] == NETWORK_OSTATUS)) { + if (($thr_parent && ($thr_parent[0]['network'] == NETWORK_OSTATUS)) || ($parent['network'] == NETWORK_OSTATUS)) { $diaspora_delivery = false; @@ -577,7 +577,7 @@ function notifier_run(&$argv, &$argc){ } // Notify PuSH subscribers (Used for OStatus distribution of regular posts) - if ($push_notify AND strlen($hub)) { + if ($push_notify && strlen($hub)) { $hubs = explode(',', $hub); if (count($hubs)) { foreach ($hubs as $h) {