示例#1
0
文件: list.php 项目: legende91/ez
            $limit = 50;
            break;
        default:
            $limit = 10;
            break;
    }
} else {
    $limit = 10;
}
if ($http->hasPostVariable('RemoveButton')) {
    if ($http->hasPostVariable('DeleteIDArray')) {
        $deleteIDArray = $http->postVariable('DeleteIDArray');
        $db = eZDB::instance();
        $db->begin();
        foreach ($deleteIDArray as $deleteID) {
            eZRole::removeRole($deleteID);
        }
        // Clear role caches.
        eZRole::expireCache();
        // Clear all content cache.
        eZContentCacheManager::clearAllContentCache();
        $db->commit();
    }
}
// Redirect to content node browse in the user tree
// Assign the role for a user or group
if ($Module->isCurrentAction('AssignRole')) {
    $selectedObjectIDArray = eZContentBrowse::result('AssignRole');
    foreach ($selectedObjectIDArray as $objectID) {
        $role->assignToUser($objectID);
    }