aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-03-21 16:02:37 +0000
committerCash Costello <cash.costello@gmail.com>2009-03-21 16:02:37 +0000
commite340946cd80864a9b2c816e2f21a57d934761fcb (patch)
tree1add11fe6aa6532079843c970e857975553fb8a8
parent21ac24fcb37ded0a91ed32051936c93cc48fa002 (diff)
downloadelgg-e340946cd80864a9b2c816e2f21a57d934761fcb.tar.gz
elgg-e340946cd80864a9b2c816e2f21a57d934761fcb.tar.bz2
setting page owner
-rw-r--r--edit_multi.php16
1 files 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;
}
}