diff options
author | Sem <sembrestels@riseup.net> | 2013-11-09 16:22:50 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2013-11-09 16:22:50 +0100 |
commit | f448cd91f9ecebea37daf40aada2fa1a20200817 (patch) | |
tree | 4636059da6a1be133a4974e5098b7c1e08944dd5 /mod/lightpics/pages/photos/album/edit.php | |
parent | 52335325e5ea8c89c711e1ba40d9ac1657004e61 (diff) | |
parent | 324f39c3a9aa41e9e23bafba38882a2b72f62441 (diff) | |
download | elgg-f448cd91f9ecebea37daf40aada2fa1a20200817.tar.gz elgg-f448cd91f9ecebea37daf40aada2fa1a20200817.tar.bz2 |
Add 'mod/lightpics/' from commit '324f39c3a9aa41e9e23bafba38882a2b72f62441'
git-subtree-dir: mod/lightpics
git-subtree-mainline: 52335325e5ea8c89c711e1ba40d9ac1657004e61
git-subtree-split: 324f39c3a9aa41e9e23bafba38882a2b72f62441
Diffstat (limited to 'mod/lightpics/pages/photos/album/edit.php')
-rw-r--r-- | mod/lightpics/pages/photos/album/edit.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mod/lightpics/pages/photos/album/edit.php b/mod/lightpics/pages/photos/album/edit.php new file mode 100644 index 000000000..7efb05ce1 --- /dev/null +++ b/mod/lightpics/pages/photos/album/edit.php @@ -0,0 +1,48 @@ +<?php +/** + * Edit an album + * + * @author Cash Costello + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 + */ + +$guid = (int) get_input('guid'); + +if (!$entity = get_entity($guid)) { + // @todo either deleted or do not have access + forward('photos/all'); +} + +if (!$entity->canEdit()) { + // @todo cannot change it + forward('photos/all'); +} + +elgg_set_page_owner_guid($entity->getContainerGUID()); +$owner = elgg_get_page_owner_entity(); + +gatekeeper(); +group_gatekeeper(); + +$title = elgg_echo('album:edit'); + +// set up breadcrumbs +elgg_push_breadcrumb(elgg_echo('photos'), "photos/all"); +if (elgg_instanceof($owner, 'user')) { + elgg_push_breadcrumb($owner->name, "photos/owner/$owner->username"); +} else { + elgg_push_breadcrumb($owner->name, "photos/group/$owner->guid/all"); +} +elgg_push_breadcrumb($entity->getTitle(), $entity->getURL()); +elgg_push_breadcrumb($title); + +$vars = tidypics_prepare_form_vars($entity); +$content = elgg_view_form('photos/album/save', array('method' => 'post'), $vars); + +$body = elgg_view_layout('content', array( + 'content' => $content, + 'title' => $title, + 'filter' => '', +)); + +echo elgg_view_page($title, $body); |