aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/views/default
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-14 21:42:20 +0200
committerSem <sembrestels@riseup.net>2012-07-14 21:42:20 +0200
commit3bd71fbe0aa4a64021c4c2d59b0782faba8c22b6 (patch)
tree1a3123403eca12fe284442cab6e87fe1b93c5fde /mod/pages/views/default
parent1d2ce9657a44398646ed1a3980d89a1d2f50fa05 (diff)
downloadelgg-3bd71fbe0aa4a64021c4c2d59b0782faba8c22b6.tar.gz
elgg-3bd71fbe0aa4a64021c4c2d59b0782faba8c22b6.tar.bz2
Refs #1334. Prevent cycles in the pages tree.
Diffstat (limited to 'mod/pages/views/default')
-rw-r--r--mod/pages/views/default/forms/pages/edit.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php
index 119b9ba23..583dc414f 100644
--- a/mod/pages/views/default/forms/pages/edit.php
+++ b/mod/pages/views/default/forms/pages/edit.php
@@ -18,7 +18,8 @@ foreach ($variables as $name => $type) {
if (($type == 'access' || $type == 'write_access') && !$can_change_access) {
continue;
}
- if ($name == 'parent_guid' && empty($vars['parent_guid'])) {
+ // don't show parent picker input for top or new pages.
+ if ($name == 'parent_guid' && (!$vars['parent_guid'] || !$vars['guid'])) {
continue;
}
?>