mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-11 01:33:51 -04:00
Add item delete support to the organize module. Fixes #1588.
This commit is contained in:
@@ -159,6 +159,21 @@ class Organize_Controller extends Controller {
|
||||
json::reply(null);
|
||||
}
|
||||
|
||||
function delete() {
|
||||
access::verify_csrf();
|
||||
|
||||
$input = Input::instance();
|
||||
|
||||
foreach (explode(",", $input->post("item_ids")) as $item_id) {
|
||||
$item = ORM::factory("item", $item_id);
|
||||
if (access::can("edit", $item)) {
|
||||
$item->delete();
|
||||
}
|
||||
}
|
||||
|
||||
json::reply(null);
|
||||
}
|
||||
|
||||
private function _get_tree($item, $selected) {
|
||||
$tree = array();
|
||||
$children = $item->viewable()
|
||||
|
||||
Reference in New Issue
Block a user