]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsubhubbub.php
Merge remote-tracking branch 'upstream/develop' into share-rework
[friendica.git] / mod / pubsubhubbub.php
index 6cd95995043049b9bc3e84adb1603267427e76dc..5dda9ee0af966fc9a97da01049317d8d594fb889 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -21,6 +21,7 @@
 
 use Friendica\App;
 use Friendica\Core\Logger;
+use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\PushSubscriber;
@@ -43,7 +44,7 @@ function pubsubhubbub_init(App $a) {
        // [hub_secret] => af11...
        // [hub_topic] => http://friendica.local/dfrn_poll/sazius
 
-       if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+       if (DI::args()->getMethod() === App\Router::POST) {
                $hub_mode         = $_POST['hub_mode']         ?? '';
                $hub_callback     = $_POST['hub_callback']     ?? '';
                $hub_verify_token = $_POST['hub_verify_token'] ?? '';
@@ -142,5 +143,5 @@ function pubsubhubbub_init(App $a) {
 
                throw new \Friendica\Network\HTTPException\AcceptedException();
        }
-       exit();
+       System::exit();
 }