X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fpubsubhubbub.php;h=051ae2e84264d74e6678869f02f0620aaef26902;hb=11e6b6358b6ff7c0de19b23d41b19a7cf481c757;hp=477d1e2968f2053d00aba2021a412068e39357ef;hpb=a0530d1066d7268f1b1ea67bc3c254e9f9fc5ec8;p=friendica.git diff --git a/mod/pubsubhubbub.php b/mod/pubsubhubbub.php index 477d1e2968..051ae2e842 100644 --- a/mod/pubsubhubbub.php +++ b/mod/pubsubhubbub.php @@ -1,6 +1,11 @@ get_curl_code(); // give up if the HTTP return code wasn't a success (2xx) if ($ret < 200 || $ret > 299) { logger("pubsubhubbub: subscriber verification at $hub_callback ". "returned $ret, ignoring."); - http_status_exit(404); + System::httpExit(404); } // check that the correct hub_challenge code was echoed back @@ -122,7 +127,7 @@ function pubsubhubbub_init(App $a) { logger("pubsubhubbub: subscriber did not echo back ". "hub.challenge, ignoring."); logger("\"$hub_challenge\" != \"".trim($body)."\""); - http_status_exit(404); + System::httpExit(404); } // fetch the old subscription if it exists @@ -134,12 +139,12 @@ function pubsubhubbub_init(App $a) { dbesc($hub_callback)); if ($subscribe) { - $last_update = datetime_convert('UTC','UTC','now','Y-m-d H:i:s'); + $last_update = DateTimeFormat::utcNow(); $push_flag = 0; // if we are just updating an old subscription, keep the // old values for push and last_update - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $last_update = $r[0]['last_update']; $push_flag = $r[0]['push']; } @@ -160,7 +165,7 @@ function pubsubhubbub_init(App $a) { logger("pubsubhubbub: successfully unsubscribed [$hub_callback]."); // we do nothing here, since the row was already deleted } - http_status_exit(202); + System::httpExit(202); } killme();