mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-07 07:30:57 -04:00
Don't try to move an item into its own descendant hierarchy. Just leave it out of the move for now.
This commit is contained in:
@@ -46,7 +46,10 @@ class Organize_Controller extends Controller {
|
||||
|
||||
$album = ORM::factory("item", $album_id);
|
||||
foreach ($this->input->post("source_ids") as $source_id) {
|
||||
item::move(ORM::factory("item", $source_id), $album);
|
||||
$source = ORM::factory("item", $source_id);
|
||||
if (!$album->is_descendant($source)) {
|
||||
item::move($source, $album);
|
||||
}
|
||||
}
|
||||
|
||||
print json_encode(
|
||||
|
||||
Reference in New Issue
Block a user