X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpubsub.php;h=60df449b535a95edc5ccf46b38183c0728816a9b;hb=10ede7314136edb1c475e1af546a59ff4c5648cf;hp=0924610447fc71fb6f6f499a38506e2f0cbf8a7b;hpb=0cd241bcbe762e38e2eba0c58800eb60a2240e36;p=friendica.git diff --git a/mod/pubsub.php b/mod/pubsub.php index 0924610447..60df449b53 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -1,8 +1,10 @@ argc > 1) ? notags(trim($a->argv[1])) : ''); $contact_id = (($a->argc > 2) ? intval($a->argv[2]) : 0 ); - if ($_SERVER['REQUEST_METHOD'] === 'GET') { + if($_SERVER['REQUEST_METHOD'] === 'GET') { $hub_mode = ((x($_GET,'hub_mode')) ? notags(trim($_GET['hub_mode'])) : ''); $hub_topic = ((x($_GET,'hub_topic')) ? notags(trim($_GET['hub_topic'])) : ''); @@ -68,7 +70,7 @@ function pubsub_init(App $a) { } if ($hub_topic) - if (! link_compare($hub_topic,$r[0]['poll'])) { + if(! link_compare($hub_topic,$r[0]['poll'])) { logger('pubsub: hub topic ' . $hub_topic . ' != ' . $r[0]['poll']); // should abort but let's humour them. } @@ -78,8 +80,8 @@ function pubsub_init(App $a) { // We must initiate an unsubscribe request with a verify_token. // Don't allow outsiders to unsubscribe us. - if ($hub_mode === 'unsubscribe') { - if (! strlen($hub_verify)) { + if($hub_mode === 'unsubscribe') { + if(! strlen($hub_verify)) { logger('pubsub: bogus unsubscribe'); hub_return(false, ''); } @@ -106,7 +108,7 @@ function pubsub_post(App $a) { logger('pubsub: user-agent: ' . $_SERVER['HTTP_USER_AGENT'] ); logger('pubsub: data: ' . $xml, LOGGER_DATA); -// if (! stristr($xml,'