* @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org * @since file available since contenido release <= 4.6 * * {@internal * created 2003-05-30 * modified 2008-06-27, Frederic Schneider, add security fix * modified 2009-11-06, Murat Purc, replaced deprecated functions (PHP 5.3 ready) * modified 2011-02-07, Murat Purc, Cleanup, optimization and formatting * * $Id$: * }} * */ if(!defined('CON_FRAMEWORK')) { die('Illegal call'); } cInclude('includes', 'functions.rights.php'); if (!$perm->have_perm_area_action($area, $action)) { // access denied $notification->displayNotification('error', i18n('Permission denied')); return; } if (!isset($groupid)) { // no group id, get out here return; } // create group instance $oGroup = new Group(); $oGroup->loadGroupByGroupID($groupid); $bError = false; $sNotification = ''; $aPerms = array(); // edit group if (($action == 'group_edit')) { $aPerms = buildUserOrGroupPermsFromRequest(); $oGroup->setField('description', Contenido_Security::escapeDB($description, $db)); $oGroup->setField('perms', Contenido_Security::escapeDB(implode(',', $aPerms), $db)); if ($oGroup->store()) { $sNotification = $notification->returnNotification("info", i18n("Changes saved")); } else { $sNotification = $notification->returnNotification("warn", i18n("Changes couldn't saved")); $bError = true; } } // delete group property if (is_string($del_groupprop_type) && is_string($del_groupprop_name)) { $oGroup->deleteGroupProperty($del_groupprop_type, $del_groupprop_name); } // add group property if (is_string($groupprop_type) && is_string($groupprop_name) && is_string($groupprop_value) && !empty($groupprop_type) && !empty($groupprop_name)) { $oGroup->setGroupProperty($groupprop_type, $groupprop_name, $groupprop_value); } $aPerms = explode(',', $oGroup->getField('perms')); $tpl->reset(); $tpl->set('s','NOTIFICATION', $sNotification); $form = '