From e340946cd80864a9b2c816e2f21a57d934761fcb Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 21 Mar 2009 16:02:37 +0000 Subject: setting page owner --- edit_multi.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/edit_multi.php b/edit_multi.php index c6eb7de88..c4f35bc07 100644 --- a/edit_multi.php +++ b/edit_multi.php @@ -8,16 +8,24 @@ gatekeeper(); set_context('photos'); + + $page_owner = page_owner_entity(); + if ($page_owner === false || is_null($page_owner)) { + $page_owner = $_SESSION['user']; + set_page_owner($page_owner->getGUID()); + } + $file_string = get_input('files'); $file_array_sent = explode('-', $file_string); $new_file_array = array(); - foreach($file_array_sent as $file_guid){ - if ($entity = get_entity($file_guid)){ - if($entity->canEdit()){ + foreach ($file_array_sent as $file_guid) { + if ($entity = get_entity($file_guid)) { + if ($entity->canEdit()){ array_push($new_file_array, $file_guid); } - if(!$album_guid) $album_guid = $entity->container_guid; + if (!$album_guid) + $album_guid = $entity->container_guid; } } -- cgit v1.2.3