From eb345cb8702f3443087c7fab815301c0a08281a3 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 10 Sep 2009 06:17:21 -0700 Subject: 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. --- modules/organize/controllers/organize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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); } } -- cgit v1.2.3