forked from GNUsocial/gnu-social
Merge branch 'master' into 0.9.x
This commit is contained in:
commit
641018e950
@ -20,11 +20,17 @@
|
|||||||
|
|
||||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
|
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
|
||||||
|
|
||||||
|
$longoptions = array('unsub');
|
||||||
|
$shortoptions = 'u';
|
||||||
|
|
||||||
$helptext = <<<END_OF_HELP
|
$helptext = <<<END_OF_HELP
|
||||||
resub-feed.php [options] http://example.com/atom-feed-url
|
resub-feed.php [options] http://example.com/atom-feed-url
|
||||||
Reinitialize the PuSH subscription for the given feed. This may help get
|
Reinitialize the PuSH subscription for the given feed. This may help get
|
||||||
things restarted if we and the hub have gotten our states out of sync.
|
things restarted if we and the hub have gotten our states out of sync.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
-u --unsub Unsubscribe instead of subscribing.
|
||||||
|
|
||||||
END_OF_HELP;
|
END_OF_HELP;
|
||||||
|
|
||||||
@ -48,8 +54,14 @@ print "Old state:\n";
|
|||||||
showSub($sub);
|
showSub($sub);
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
print "Pinging hub $sub->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) {
|
if ($ok) {
|
||||||
print "ok\n";
|
print "ok\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user