diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-08-08 01:12:43 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-08-08 01:12:43 -0700 |
commit | 4e95ec843a2bef45e044e2aa3a36fcb590d85464 (patch) | |
tree | d4f279837f36cd109e92c99543392334da31bd68 /modules/gallery/helpers/data_rest.php | |
parent | 7f61f9754e3bcf7cd9c85d65414e1ee7945fdca5 (diff) |
Allow item_rest::put() to replace the current data file. Remove
data_rest::put() altogether; it's no longer necessary.
Diffstat (limited to 'modules/gallery/helpers/data_rest.php')
-rw-r--r-- | modules/gallery/helpers/data_rest.php | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/modules/gallery/helpers/data_rest.php b/modules/gallery/helpers/data_rest.php index ca5acb4a..e45a4645 100644 --- a/modules/gallery/helpers/data_rest.php +++ b/modules/gallery/helpers/data_rest.php @@ -58,18 +58,6 @@ class data_rest_Core { return $result; } - static function put($request) { - $item = rest::resolve($request->url); - access::required("edit", $item); - - if ($item->is_album()) { - throw new Rest_Exception("Bad Request", 400, array("errors" => array("type" => "invalid"))); - } - - $item->set_data_file($request->file); - $item->save(); - } - static function resolve($id) { $item = ORM::factory("item", $id); if (!access::can("view", $item)) { |