Allow item_rest::put() to replace the current data file. Remove

data_rest::put() altogether; it's no longer necessary.
This commit is contained in:
Bharat Mediratta
2010-08-08 01:12:43 -07:00
parent 7f61f9754e
commit 4e95ec843a
2 changed files with 6 additions and 12 deletions
+6
View File
@@ -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") {