diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-19 15:19:02 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-19 15:19:02 +0000 |
commit | b5e2dbf292cddd56a8171b4c9cf1d9cf0fb45582 (patch) | |
tree | aa7f916fba9fc61869f71492266d537f34e4d736 /mod/pages/pages/pages/edit.php | |
parent | e603c947a5ae2869164b11fee827d4c595e4a3f8 (diff) | |
download | elgg-b5e2dbf292cddd56a8171b4c9cf1d9cf0fb45582.tar.gz elgg-b5e2dbf292cddd56a8171b4c9cf1d9cf0fb45582.tar.bz2 |
Fixes #3158 updated search and pages plugins for page handler scripts
git-svn-id: http://code.elgg.org/elgg/trunk@8769 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages/pages/pages/edit.php')
-rw-r--r-- | mod/pages/pages/pages/edit.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mod/pages/pages/pages/edit.php b/mod/pages/pages/pages/edit.php new file mode 100644 index 000000000..8e530084b --- /dev/null +++ b/mod/pages/pages/pages/edit.php @@ -0,0 +1,42 @@ +<?php +/** + * Edit a page + * + * @package ElggPages + */ + +gatekeeper(); + +$page_guid = get_input('guid'); +$page = get_entity($page_guid); +if (!$page) { + +} + +$container = $page->getContainerEntity(); +if (!$container) { + +} + +elgg_set_page_owner_guid($container->getGUID()); + +elgg_push_breadcrumb($page->title, $page->getURL()); +elgg_push_breadcrumb(elgg_echo('edit')); + +$title = elgg_echo("pages:edit"); + +if ($page->canEdit()) { + $vars = pages_prepare_form_vars($page); + $content = elgg_view_form('pages/edit', array(), $vars); +} else { + $content = elgg_echo("pages:noaccess"); +} + +$body = elgg_view_layout('content', array( + 'filter' => '', + 'buttons' => '', + 'content' => $content, + 'title' => $title, +)); + +echo elgg_view_page($title, $body); |