diff options
author | Evan Prodromou <evan@status.net> | 2010-08-03 16:05:03 -0700 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-08-03 16:05:03 -0700 |
commit | 9f0715a9935966f3ec483bccc476d5baf3324b3c (patch) | |
tree | 9874247927e5e24044c75a48a9c04e427b0ba477 /scripts/settag.php | |
parent | 004e42e3e0606f0f9e5c8b6cd4512e5d870cd56e (diff) | |
parent | b17fc0ca5b90d2cdc957ebc4870fbd2791b9e1b9 (diff) |
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'scripts/settag.php')
-rw-r--r-- | scripts/settag.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/scripts/settag.php b/scripts/settag.php index d1b06ff10..ca260f7bf 100644 --- a/scripts/settag.php +++ b/scripts/settag.php @@ -39,11 +39,10 @@ if (count($args) < 1) { } $nickname = $args[0]; - $sn = Status_network::memGet('nickname', $nickname); if (empty($sn)) { - print "No such site.\n"; + print "No such site ($nickname).\n"; exit(-1); } @@ -54,16 +53,13 @@ if (count($args) == 1) { exit(0); } $tag = $args[1]; - $i = array_search($tag, $tags); if ($i !== false) { if (have_option('d', 'delete')) { // Delete unset($tags[$i]); - $orig = clone($sn); - $sn->tags = implode('|', $tags); - $result = $sn->update($orig); + $result = $sn->setTags($tags); if (!$result) { print "Couldn't update.\n"; exit(-1); @@ -78,9 +74,7 @@ if ($i !== false) { exit(-1); } else { $tags[] = $tag; - $orig = clone($sn); - $sn->tags = implode('|', $tags); - $result = $sn->update($orig); + $result = $sn->setTags($tags); if (!$result) { print "Couldn't update.\n"; exit(-1); |