diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/photos/album/view.php | 2 | ||||
-rw-r--r-- | pages/photos/image/upload.php | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/pages/photos/album/view.php b/pages/photos/album/view.php index 39816b299..cef3647ee 100644 --- a/pages/photos/album/view.php +++ b/pages/photos/album/view.php @@ -32,7 +32,7 @@ elgg_push_breadcrumb($album->getTitle()); $content = elgg_view_entity($album, array('full_view' => true)); -if ($album->canWriteToContainer()) { +if ($album->getContainerEntity()->canWriteToContainer()) { elgg_register_menu_item('title', array( 'name' => 'upload', 'href' => 'photos/upload/' . $album->getGUID(), diff --git a/pages/photos/image/upload.php b/pages/photos/image/upload.php index 526972a35..7d9db5ed8 100644 --- a/pages/photos/image/upload.php +++ b/pages/photos/image/upload.php @@ -21,14 +21,15 @@ if (elgg_get_plugin_setting('uploader', 'tidypics') != "disabled") { } $album = get_entity($album_guid); -if (!$album || !$album->canEdit()) { +if (!$album) { // @todo // throw warning and forward to previous page forward(REFERER); } -if (!$album->canEdit()) { +if (!$album->getContainerEntity()->canWriteToContainer()) { // @todo have to be able to edit album to upload photos + forward(REFERER); } // set page owner based on container (user or group) |