From af5b59b518123a15a7182ebfe2487a9e10f67ee8 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 22 Jan 2011 16:36:30 +0000 Subject: 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 --- mod/pages/new.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mod/pages/new.php') 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' => '', -- cgit v1.2.3