Code beautification and some more logging data - no changes in the functionality.

This commit is contained in:
Michael Vogel 2014-04-04 11:02:36 +02:00
commit 5f3d584716
3 changed files with 48 additions and 48 deletions

View file

@ -1,7 +1,7 @@
<?php
function hub_return($valid,$body) {
if($valid) {
header($_SERVER["SERVER_PROTOCOL"] . ' 200 ' . 'OK');
echo $body;
@ -18,7 +18,7 @@ function hub_return($valid,$body) {
// when receiving an XML feed, always return OK
function hub_post_return() {
header($_SERVER["SERVER_PROTOCOL"] . ' 200 ' . 'OK');
killme();
@ -69,7 +69,7 @@ function pubsub_init(&$a) {
if(! link_compare($hub_topic,$r[0]['poll'])) {
logger('pubsub: hub topic ' . $hub_topic . ' != ' . $r[0]['poll']);
// should abort but let's humour them.
// should abort but let's humour them.
}
$contact = $r[0];
@ -130,7 +130,7 @@ function pubsub_post(&$a) {
);
if(! count($r)) {
logger('pubsub: no contact record - ignored');
logger('pubsub: no contact record for "'.$nick.' ('.$contact_id.')" - ignored. '.$xml);
hub_post_return();
}