X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fenotify.php;h=d548ec1ac72bfda6df3d3d85776ca6c639dc3c22;hb=6a8a36f12d00f35004fbb034972ca87dd1a3c4f5;hp=99258c64c8761509c452e99ca304e700ecc5f37f;hpb=293436e5fd5110220c969513858dbb979f1f35d3;p=friendica.git diff --git a/include/enotify.php b/include/enotify.php index 99258c64c8..d548ec1ac7 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -411,7 +411,7 @@ function notification($params) { $hash = random_string(); $r = q("SELECT `id` FROM `notify` WHERE `hash` = '%s' LIMIT 1", dbesc($hash)); - if (count($r)) + if (dbm::is_result($r)) $dups = true; } while($dups == true); @@ -733,7 +733,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") { intval($item[0]['contact-id']), intval($uid) ); - $send_notification = count($r); + $send_notification = dbm::is_result($r); if (!$send_notification) { $tags = q("SELECT `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` = %d AND `uid` = %d", @@ -743,7 +743,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") { foreach ($tags AS $tag) { $r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `notify_new_posts`", normalise_link($tag["url"]), intval($uid)); - if (count($r)) + if (dbm::is_result($r)) $send_notification = true; } }