From 9ad00f726fff19caf5731eaf643b9910fef5e28f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 2 Mar 2011 12:49:37 -0800 Subject: [PATCH] Add unsubscribe option to resub-feed.php --- plugins/OStatus/scripts/resub-feed.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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"; -- 2.39.5