- if(($hub_mode === 'unsubscribe') && (! strlen($hub_verify)))
- hub_return(false, '');
-
- $r = q("UPDATE `contact` SET `subhub` = %d WHERE `id` = %d LIMIT 1",
- intval($subscribe),
- intval($contact['id'])
- );
-
- hub_return(true, $hub_challenge);
+ if($hub_mode === 'unsubscribe') {
+ if(! strlen($hub_verify)) {
+ logger('pubsub: bogus unsubscribe');
+ hub_return(false, '');
+ }
+ logger('pubsub: unsubscribe success');
+ }
+
+ if ($hub_mode)
+ $r = q("UPDATE `contact` SET `subhub` = %d WHERE `id` = %d",
+ intval($subscribe),
+ intval($contact['id'])
+ );
+
+ hub_return(true, $hub_challenge);