summaryrefslogtreecommitdiff
path: root/modules/organize/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-09-21 21:29:13 -0700
committerBharat Mediratta <bharat@menalto.com>2009-09-21 21:29:13 -0700
commite5a78d39ec49332054cbc1a398d7c110e1d9191c (patch)
treec2acb4731a381b7a1b28fa5ed505a76adb23a3ef /modules/organize/controllers
parent529ded3388673036314eefd5bfb1cfc0b76f7f9e (diff)
parent33690a32bcf132e5ab470ff77ba23c073ac26271 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts: modules/gallery/controllers/albums.php
Diffstat (limited to 'modules/organize/controllers')
-rw-r--r--modules/organize/controllers/organize.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php
index 4639777c..08c80de3 100644
--- a/modules/organize/controllers/organize.php
+++ b/modules/organize/controllers/organize.php
@@ -45,16 +45,20 @@ class Organize_Controller extends Controller {
access::verify_csrf();
$target_album = ORM::factory("item", $target_album_id);
+ access::required("view", $target_album);
+ access::required("add", $target_album);
+
foreach ($this->input->post("source_ids") as $source_id) {
$source = ORM::factory("item", $source_id);
if (!$source->contains($target_album)) {
+ access::required("edit", $source);
item::move($source, $target_album);
}
}
print json_encode(
- array("tree" => self::_expanded_tree(ORM::factory("item", 1), $album)->__toString(),
- "grid" => self::_get_micro_thumb_grid($album, 0)->__toString()));
+ array("tree" => self::_expanded_tree(ORM::factory("item", 1), $target_album)->__toString(),
+ "grid" => self::_get_micro_thumb_grid($target_album, 0)->__toString()));
}
function rearrange($target_id, $before_or_after) {