summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-20 21:14:40 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-20 21:14:40 -0800
commit3d4a6d6336a2eaa212878f8af788825256be9e9c (patch)
tree7f975d3b88b625efdd4fb3d82b422c3276545f82 /modules/tag/helpers
parent210e02f0001489cdfa22da2fb57d6db08954aef3 (diff)
Remove unused untagging code from put()
Add access permissions to delete() Remove unnecessary return value from delete()
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_rest.php16
1 files changed, 1 insertions, 15 deletions
diff --git a/modules/tag/helpers/tag_rest.php b/modules/tag/helpers/tag_rest.php
index e7be9afa..0226c6d3 100644
--- a/modules/tag/helpers/tag_rest.php
+++ b/modules/tag/helpers/tag_rest.php
@@ -43,19 +43,6 @@ class tag_rest_Core {
static function put($request) {
$tag = rest::resolve($request->url);
-
- if (isset($request->params->remove)) {
- if (!is_array($request->params->remove)) {
- throw new Exception("Bad request", 400);
- }
-
- foreach ($request->params->remove as $item_url) {
- $item = rest::resolve($item_url);
- access::required("edit", $item);
- $tag->remove($item);
- }
- }
-
if (isset($request->params->name)) {
$tag->name = $request->params->name;
}
@@ -73,11 +60,10 @@ class tag_rest_Core {
} else {
// Remove an item from the tag
$item = rest::resolve($request->params->url);
+ access::required("edit", $item);
$tag->remove($item);
$tag->save();
-
tag::compact();
- return array("url" => rest::url("tag", $tag));
}
}