$cur_section->item = $item; $cur_section->anchor = $anchor; $cur_section->overlay = $overlay; // editors can do what they want on items anchored here if ($cur_section->is_assigned() && Surfer::is_member() || is_object($anchor) && $anchor->is_assigned()) { Surfer::empower(); } elseif ($cur_section->is_assigned() && Surfer::is_logged() || is_object($anchor) && $anchor->is_assigned()) { Surfer::empower('S'); } // // is this surfer allowed to browse the page? // // change default behavior if (is_object($behaviors) && !$behaviors->allow('sections/view.php', 'section:' . $item['id'])) { $permitted = FALSE; } elseif ($cur_section->allows('access')) { $permitted = TRUE; } else { $permitted = FALSE; } // load the skin, maybe with a variant load_skin('sections', $anchor, isset($item['options']) ? $item['options'] : ''); // clear the tab we are in if (is_object($anchor)) { $context['current_focus'] = $anchor->get_focus(); } if (isset($item['id'])) { $context['current_focus'][] = 'section:' . $item['id']; } // current item if (isset($item['id'])) {
$overlay = Overlay::bind($_SESSION['pasted_variant']); unset($_SESSION['pasted_variant']); } elseif (!isset($item['id']) && is_object($anchor)) { $overlay = $anchor->get_overlay('section_overlay'); } // current edited section as object $cur_section = new section(); $cur_section->item = $item; $cur_section->anchor = $anchor; $cur_section->overlay = $overlay; // we are at site root if ($anchor === null && Surfer::is_associate()) { $permitted = TRUE; } elseif (!isset($item['id']) && $anchor->allows('creation', 'section')) { $permitted = TRUE; } elseif (isset($item['id']) && $cur_section->allows('modification')) { $permitted = TRUE; } else { $permitted = FALSE; } global $render_overlaid; $whole_rendering = !$render_overlaid; // do not always show the edition form $with_form = FALSE; // load the skin, maybe with a variant load_skin('sections', $anchor, isset($item['options']) ? $item['options'] : ''); // clear the tab we are in, if any if (is_object($anchor)) { $context['current_focus'] = $anchor->get_focus(); } // current item