aboutsummaryrefslogtreecommitdiff
path: root/mod/pages
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages')
-rw-r--r--mod/pages/pages/pages/view.php3
-rw-r--r--mod/pages/start.php4
-rw-r--r--mod/pages/views/default/pages/sidebar/navigation.php6
3 files changed, 7 insertions, 6 deletions
diff --git a/mod/pages/pages/pages/view.php b/mod/pages/pages/pages/view.php
index 6b9d03f49..e1c3fdbfd 100644
--- a/mod/pages/pages/pages/view.php
+++ b/mod/pages/pages/pages/view.php
@@ -9,7 +9,8 @@ $page_guid = get_input('guid');
$page = get_entity($page_guid);
if (!$page) {
register_error(elgg_echo('noaccess'));
- forward();
+ $_SESSION['last_forward_from'] = current_page_url();
+ forward('');
}
elgg_set_page_owner_guid($page->getContainerGUID());
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 834e98870..c385131bd 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -106,10 +106,6 @@ function pages_page_handler($page) {
elgg_load_library('elgg:pages');
- // add the jquery treeview files for navigation
- elgg_load_js('jquery-treeview');
- elgg_load_css('jquery-treeview');
-
if (!isset($page[0])) {
$page[0] = 'all';
}
diff --git a/mod/pages/views/default/pages/sidebar/navigation.php b/mod/pages/views/default/pages/sidebar/navigation.php
index fe017b1a7..65eb500c8 100644
--- a/mod/pages/views/default/pages/sidebar/navigation.php
+++ b/mod/pages/views/default/pages/sidebar/navigation.php
@@ -5,6 +5,11 @@
* @uses $vars['page'] Page object if manually setting selected item
*/
+// add the jquery treeview files for navigation
+elgg_load_js('jquery-treeview');
+elgg_load_css('jquery-treeview');
+
+
$selected_page = elgg_extract('page', $vars, false);
if ($selected_page) {
$url = $selected_page->getURL();
@@ -51,4 +56,3 @@ if ($selected_page) {
});
</script>
-