Beispiel #1
0
        if ($http->hasSessionVariable('SectionIDArray')) {
            $sectionIDArray = $http->sessionVariable('SectionIDArray');
            $db = eZDB::instance();
            $db->begin();
            foreach ($sectionIDArray as $sectionID) {
                $section = eZSection::fetch($sectionID);
                if (is_object($section) and $section->canBeRemoved()) {
                    // Clear content cache if needed
                    eZContentCacheManager::clearContentCacheIfNeededBySectionID($sectionID);
                    $section->remove();
                }
            }
            $db->commit();
        }
    } else {
        return $Module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
    }
}
$viewParameters = array('offset' => $offset);
$sectionArray = eZSection::fetchByOffset($offset, $limit);
$sectionCount = eZSection::sectionCount();
$currentUser = eZUser::currentUser();
$allowedAssignSectionList = $currentUser->canAssignSectionList();
$tpl->setVariable("limit", $limit);
$tpl->setVariable('section_array', $sectionArray);
$tpl->setVariable('section_count', $sectionCount);
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('allowed_assign_sections', $allowedAssignSectionList);
$Result = array();
$Result['content'] = $tpl->fetch("design:section/list.tpl");
$Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('kernel/section', 'Sections')));