summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a0c2e2)
raw | patch | inline | side by side (parent: 2a0c2e2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Dec 2007 12:09:05 +0000 (12:09 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Dec 2007 12:09:05 +0000 (12:09 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8121 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/posix/class_posixAccount.inc | patch | blob | history |
diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc
index 528fdc945d5fb969a44e75ebe762c80795203dea..4f4380a8957ea2499201ceb5f63f7f178068bdf8 100644 (file)
);
}
+
+ /* Return selected values for multiple edit */
function get_multi_edit_values()
{
$ret = plugin::get_multi_edit_values();
}
+ /* Save posts for multiple edit
+ */
function multiple_save_object()
{
if(isset($_POST['posix_mulitple_edit'])){
-
+
+ /* Backup expire value */
$expire_tmp = $this->shadowExpire;
+ /* Update all values */
plugin::multiple_save_object();
+
+ /* Get selected checkboxes */
foreach(array("primaryGroup","trustmode","mustchangepassword","activate_shadowWarning","activate_shadowInactive","activate_shadowMin", "activate_shadowMax","activate_shadowExpire") as $val){
if(isset($_POST["use_".$val])){
$this->multi_boxes[] = $val;
}
}
- /* Get selected shadow checkboxes */
+ /* Update special values, checkboxes for posixShadow */
foreach(array("shadowMin","shadowMax","shadowExpire","shadowInactive","shadowWarning") as $var) {
if($this->acl_is_writeable($var)){
$activate_var = "activate_".$var;
}
}
+ /* Restore shadow value, if the shadow attribute isn't used */
if(!in_array("activate_shadowExpire",$this->multi_boxes)){
$this->shadowExpire = $expire_tmp;
}
}
}
-
/* Save primary group settings */
if($this->acl_is_writeable("primaryGroup") && isset($_POST['primaryGroup'])){
$data= $_POST['primaryGroup'];
}
}
+
+ /* Initialize plugin with given atribute arrays
+ */
function init_multiple_support($attrs,$all)
{
plugin::init_multiple_support($attrs,$all);
- restore_error_handler();
-
+ /* Some dummy values */
$groups_some = array();
$groups_all = array();
$groups_uid = array();
- $uids = array();
- $first = TRUE;
+ $uids = array();
+ $first = TRUE;
+ /* Get all groups used by currently edited users */
$uid_filter="";
for($i =0; $i < $this->multi_attrs_all['uid']['count'] ; $i ++){
$uid = $this->multi_attrs_all['uid'][$i];
}
}
+ /* Create an array, containing all used groups */
$groups_all = $groups_some;
foreach($groups_all as $id => $group){
foreach($uids as $uid){
}
}
+ /* Assign group array */
$this->groupMembership = $groups_all;
+
+ /* Create an array of all grouops used by all users */
foreach( $groups_all as $dn => $cn){
if(isset($groups_some[$dn])){
unset($groups_some[$dn]);
$this->trustModel= "";
}
+ /* Create access informations */
$this->accessTo = array();
if (isset($this->multi_attrs['accessTo'])){
for ($i= 0; $i<$this->multi_attrs['accessTo']['count']; $i++){
/* Adjust shadow checkboxes */
foreach (array("shadowMin", "shadowMax", "shadowWarning", "shadowInactive",
"shadowExpire") as $val){
-
if ($this->$val != 0){
$oval= "activate_".$val;
$this->$oval= "1";
/* Convert to seconds */
if(isset($this->multi_attrs['shadowExpire'])){
$this->shadowExpire = $this->convertToSeconds($this->multi_attrs['shadowExpire'][0]);
+ }else{
+ $this->activate_shadowExpire = FALSE;
}
}