diff options
Diffstat (limited to 'mod/pages/actions')
-rw-r--r-- | mod/pages/actions/pages/edit.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mod/pages/actions/pages/edit.php b/mod/pages/actions/pages/edit.php index 84aed61d6..a966232a8 100644 --- a/mod/pages/actions/pages/edit.php +++ b/mod/pages/actions/pages/edit.php @@ -52,6 +52,12 @@ // New instance, so set container_guid $container_guid = get_input('container_guid', $_SESSION['user']->getGUID()); $page->container_guid = $container_guid; + + // cache data in session in case data from form does not validate + $_SESSION['page_description'] = $input['description']; + $_SESSION['page_tags'] = get_input('tags'); + $_SESSION['page_read_access'] = (int)get_input('access_id'); + $_SESSION['page_write_access'] = (int)get_input('write_access_id'); } // Have we got it? Can we edit it? @@ -96,6 +102,12 @@ // Now save description as an annotation $page->annotate('page', $page->description, $page->access_id); + + // clear cache + unset($_SESSION['page_description']); + unset($_SESSION['page_tags']); + unset($_SESSION['page_read_access']); + unset($_SESSION['page_write_access']); system_message(elgg_echo("pages:saved")); |