# # Exponent is free software; you can redistribute # it and/or modify it under the terms of the GNU # General Public License as published by the Free # Software Foundation; either version 2 of the # 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']);