X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpubsubpublish.php;h=3641bbcf74fc3d16f98ed67b13a687119e31739a;hb=2952e2b3e47d0d16e89c6ff81353a9059bfe474c;hp=05e93b864c833cbdfc74008fdc8c31ad29e89f1e;hpb=41a36606c6ee92c914acbb7f6d9ea79c0a149088;p=friendica.git diff --git a/include/pubsubpublish.php b/include/pubsubpublish.php index 05e93b864c..3641bbcf74 100644 --- a/include/pubsubpublish.php +++ b/include/pubsubpublish.php @@ -28,12 +28,10 @@ function handle_pubsubhubbub($id) { global $a; $r = q("SELECT * FROM `push_subscriber` WHERE `id` = %d", intval($id)); - - if (!dbm::is_result($r)) { + if (!$r) return; - } - - $rr = $r[0]; + else + $rr = $r[0]; logger("Generate feed of user ".$rr['nickname']." to ".$rr['callback_url']." - last updated ".$rr['last_update'], LOGGER_DEBUG); @@ -67,10 +65,8 @@ function handle_pubsubhubbub($id) { // increment this until some upper limit where we give up $new_push = intval($rr['push']) + 1; - if ($new_push > 30) { - // OK, let's give up + if ($new_push > 30) // OK, let's give up $new_push = 0; - } q("UPDATE `push_subscriber` SET `push` = %d WHERE id = %d", $new_push,