aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/new.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-22 16:36:30 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-22 16:36:30 +0000
commitaf5b59b518123a15a7182ebfe2487a9e10f67ee8 (patch)
tree4fcb24176b2b445acee48869aa816813f03352b6 /mod/pages/new.php
parent186f5474e37f9ebde09b9afe2c82fa711402b421 (diff)
downloadelgg-af5b59b518123a15a7182ebfe2487a9e10f67ee8.tar.gz
elgg-af5b59b518123a15a7182ebfe2487a9e10f67ee8.tar.bz2
more clean up of the pages plugin to use new HTML/CSS
git-svn-id: http://code.elgg.org/elgg/trunk@7898 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages/new.php')
-rw-r--r--mod/pages/new.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/mod/pages/new.php b/mod/pages/new.php
index 8a51d9f03..31b0c7951 100644
--- a/mod/pages/new.php
+++ b/mod/pages/new.php
@@ -7,24 +7,26 @@
gatekeeper();
-$container_guid = get_input('guid');
-
+$container_guid = (int) get_input('guid');
$container = get_entity($container_guid);
if (!$container) {
}
+$parent_page = null;
$page_owner = $container;
if (elgg_instanceof($container, 'object')) {
+ $parent_page = $container;
$page_owner = $container->getContainerEntity();
}
-elgg_set_page_owner_guid($page_owner->getGUID);
+elgg_set_page_owner_guid($page_owner->getGUID());
$title = elgg_echo('pages:add');
elgg_push_breadcrumb($title);
-$content = elgg_view("forms/pages/edit");
+$vars = pages_prepare_form_vars(null, $parent_page->getGUID());
+$content = elgg_view_form('pages/edit', array(), $vars);
$body = elgg_view_layout('content', array(
'filter' => '',