From: Brion Vibber Date: Wed, 2 Mar 2011 20:49:37 +0000 (-0800) Subject: Add unsubscribe option to resub-feed.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ad00f726fff19caf5731eaf643b9910fef5e28f;p=quix0rs-gnu-social.git Add unsubscribe option to resub-feed.php --- diff --git a/plugins/OStatus/scripts/resub-feed.php b/plugins/OStatus/scripts/resub-feed.php index 8803c0118b..a08d837993 100644 --- a/plugins/OStatus/scripts/resub-feed.php +++ b/plugins/OStatus/scripts/resub-feed.php @@ -20,11 +20,17 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); +$longoptions = array('unsub'); +$shortoptions = 'u'; + $helptext = <<huburi with new subscription for $sub->uri\n"; -$ok = $sub->subscribe(); + +if (have_option('u') || have_option('--unsub')) { + print "Pinging hub $sub->huburi with unsubscription for $sub->uri\n"; + $ok = $sub->unsubscribe(); +} else { + print "Pinging hub $sub->huburi with new subscription for $sub->uri\n"; + $ok = $sub->subscribe(); +} if ($ok) { print "ok\n";