function process_subsections($parent_section, $subtpl) { global $db; $section = null; $section->parent = $parent_section->id; $section->name = $subtpl->name; $section->subtheme = $subtpl->subtheme; $section->active = $subtpl->active; $section->public = $subtpl->public; $section->rank = $subtpl->rank; $section->page_title = $subtpl->page_title; $section->keywords = $subtpl->keywords; $section->description = $subtpl->description; $section->id = $db->insertObject($section, 'section'); NavigationModule::process_section($section, $subtpl); }
# License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## // Bail in case someone has visited us directly, or the Exponent framework is // otherwise not initialized. if (!defined('EXPONENT')) { exit(''); } $section = section::updatePageset($_POST, null); if (exponent_permissions_check('manage', exponent_core_makeLocation('NavigationModule', '', $section->parent))) { // Still have to do some pageset processing, mostly handled by a handy // member method of the NavigationModule class. // Since this is new, we need to increment ranks, in case the user // added it in the middle of the level. $db->increment('section', 'rank', 1, 'rank >= ' . $section->rank . ' AND parent=' . $section->parent); // New section (Pagesets always are). Insert a new database // record, and save the ID for the processing methods that need them. $section->id = $db->insertObject($section, 'section'); // Process the pageset, to add sections and subsections, as well as default content // that the pageset writer added to each element of the set. if (isset($_SESSION['nav_cache']['kids'])) { unset($_SESSION['nav_cache']['kids']); } NavigationModule::process_section($section, $_POST['pageset']); // Go back to where we came from. Probably the navigation manager. exponent_flow_redirect(); } else { echo SITE_403_HTML; }