summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/item_rest.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-08 01:12:43 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-08 01:12:43 -0700
commit4e95ec843a2bef45e044e2aa3a36fcb590d85464 (patch)
treed4f279837f36cd109e92c99543392334da31bd68 /modules/gallery/helpers/item_rest.php
parent7f61f9754e3bcf7cd9c85d65414e1ee7945fdca5 (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/item_rest.php')
-rw-r--r--modules/gallery/helpers/item_rest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gallery/helpers/item_rest.php b/modules/gallery/helpers/item_rest.php
index 6869181d..10f9e16a 100644
--- a/modules/gallery/helpers/item_rest.php
+++ b/modules/gallery/helpers/item_rest.php
@@ -126,6 +126,12 @@ class item_rest_Core {
}
}
}
+
+ // Replace the data file, if required
+ if (($item->is_photo() || $item->is_movie()) && isset($request->file)) {
+ $item->set_data_file($request->file);
+ }
+
$item->save();
if (isset($request->params->members) && $item->sort_column == "weight") {