1
0

Fixed issue with batch tagging the contents of sub-albums.

This commit is contained in:
rWatcher 2010-01-20 19:12:47 -05:00
parent f2910faf4c
commit 10e4e2842f

View File

@ -39,15 +39,13 @@ class BatchTag_Controller extends Controller {
} else {
// Generate an array of all non-album items in the current album
// and any sub albums.
$children = ORM::factory("item", $input->post("item_id"))
->where("type", "!=", "album")
->descendants();
$item = ORM::factory("item", $input->post("item_id"));
$children = $item->descendants();
}
// Loop through each item in the album and make sure the user has
// access to view and edit it.
foreach ($children as $child) {
if (access::can("view", $child) && access::can("edit", $child)) {
if (access::can("view", $child) && access::can("edit", $child) && !$child->is_album()) {
// Assuming the user can view/edit the current item, loop
// through each tag that was submitted and apply it to