]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsubhubbub.php
Docs: add a note on adding `use` on theme.php
[friendica.git] / mod / pubsubhubbub.php
index ac85657ddfea64811b5cce6ed8f2a947112b8324..7f06f9db77d5fc3fdc32641a842a5659d915bd89 100644 (file)
@@ -4,6 +4,7 @@ use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Core\System;
 use Friendica\Database\DBM;
+use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
 
 function post_var($name) {
@@ -134,11 +135,10 @@ function pubsubhubbub_init(App $a) {
                  dbesc($hub_callback));
 
                // delete old subscription if it exists
-               q("DELETE FROM `push_subscriber` WHERE `callback_url` = '%s'",
-                 dbesc($hub_callback));
+               dba::delete('push_subscriber', ['callback_url' => $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