]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '1.0.x' into testing
authorEvan Prodromou <evan@status.net>
Thu, 17 Mar 2011 13:20:32 +0000 (09:20 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 17 Mar 2011 13:20:32 +0000 (09:20 -0400)
Conflicts:
lib/common.php

actions/apigrouplistall.php
plugins/OStatus/scripts/resub-feed.php

index d05baa0992d928fdc35e5cb3b58d205d90a408da..73359ed3f96bb02688fdb0d61b436e409e58c315 100644 (file)
@@ -89,7 +89,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
         $taguribase = TagURI::base();
         $id         = "tag:$taguribase:Groups";
         $link       = common_local_url('groups');
-        // TRANS: Message is used as a subtitle when listing the lastest 20 groups. %s is a site name.
+        // TRANS: Message is used as a subtitle when listing the latest 20 groups. %s is a site name.
         $subtitle   = sprintf(_("groups on %s"), $sitename);
 
         switch($this->format) {
index 8803c0118b89ff20d12d27aac6af9b6203dfb8d3..a08d837993df35e3746c60cd670bc86213d0bc5c 100644 (file)
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
 
+$longoptions = array('unsub');
+$shortoptions = 'u';
+
 $helptext = <<<END_OF_HELP
 resub-feed.php [options] http://example.com/atom-feed-url
 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.
 
+Options:
+
+   -u --unsub  Unsubscribe instead of subscribing.
 
 END_OF_HELP;
 
@@ -48,8 +54,14 @@ print "Old state:\n";
 showSub($sub);
 
 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) {
     print "ok\n";