]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Success exit from settag.php if desired state already exists
authorEvan Prodromou <evan@status.net>
Tue, 25 Oct 2011 00:13:10 +0000 (20:13 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 25 Oct 2011 00:13:10 +0000 (20:13 -0400)
If you're adding a tag that already exists, or deleting a tag that
doesn't exist, using settag.php, the exit value is 0 instead of
previous -1. This makes scripting around tags a wee bit easier.

scripts/settag.php

index ca260f7bf9456822fb42139299fe545960b1cae7..19abce43c8018a5d1de97ca83e5740f730c2c294 100644 (file)
@@ -66,12 +66,12 @@ if ($i !== false) {
         }
     } else {
         print "Already set.\n";
-        exit(-1);
+        exit(0);
     }
 } else {
     if (have_option('d', 'delete')) { // Delete
         print "No such tag.\n";
-        exit(-1);
+        exit(0);
     } else {
         $tags[] = $tag;
         $result = $sn->setTags($tags);