diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-10 06:17:21 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-10 06:17:21 -0700 |
commit | eb345cb8702f3443087c7fab815301c0a08281a3 (patch) | |
tree | 885e2b8c0c0b59162e636adfa0fa71658180439f /modules | |
parent | 76df072e8e27239ab4c8f2abe07f664b4b1a1cbf (diff) |
Changed the check in organize_Controller::move_to:
1) check that target and source are not the same.
2) check that the source is not already a child of the target (use to be a
descendant) Fixes #741.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/organize/controllers/organize.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 27299e85..0611c334 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -47,7 +47,7 @@ class Organize_Controller extends Controller { $album = ORM::factory("item", $album_id); foreach ($this->input->post("source_ids") as $source_id) { $source = ORM::factory("item", $source_id); - if (!$album->is_descendant($source)) { + if ($album->id != $source->parent_id && $album->id != $source->id) { item::move($source, $album); } } |