From: hickert Date: Fri, 7 Dec 2007 13:32:23 +0000 (+0000) Subject: Updated multiple edit. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=de51e5dfa33ec6e75a1e92ca06e32091e844ad39;p=gosa.git Updated multiple edit. - We are now able to change the password and user image for multiple user git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8059 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_multi_plug.inc b/include/class_multi_plug.inc index 066d83028..e1bd7ce8f 100644 --- a/include/class_multi_plug.inc +++ b/include/class_multi_plug.inc @@ -220,7 +220,6 @@ class multi_plug foreach($values as $a_name => $a_value){ foreach($this->a_handles as $i_id => $o_handle){ $this->a_handles[$i_id]->by_object[$name]->$a_name = $a_value; - echo $name."->".$a_name." = ".$a_value."
"; } } } diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 30178739f..d25bf8101 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -284,8 +284,12 @@ class user extends plugin /* Assign sex */ $sex= array(0 => " ", "F" => _("female"), "M" => _("male")); $smarty->assign("gender_list", $sex); - - $language= array_merge(array(0 => " ") ,get_languages(TRUE)); + + if($this->multiple_support_active){ + $language= array_merge(array(0 => " ","{default}"=>"{default}") ,get_languages(TRUE)); + }else{ + $language= array_merge(array(0 => " ") ,get_languages(TRUE)); + } $smarty->assign("preferredLanguage_list", $language); /* Get random number for pictures */ @@ -557,11 +561,13 @@ class user extends plugin $temp= passwordMethod::get_available_methods(); $is_configurable= FALSE; $hashes = $temp['name']; - $hashes["{default}"] = "{default}"; + if($this->multiple_support_active){ + $hashes["{default}"] = "{default}"; + } if(isset($temp[$this->pw_storage])){ $test= new $temp[$this->pw_storage]($this->config); $is_configurable= $test->is_configurable(); - }else{ + }elseif($this->pw_storage != "{default}"){ new msg_dialog(_("Password method"),_("The selected password method is no longer available."),WARNING_DIALOG); } @@ -877,7 +883,7 @@ class user extends plugin if (!function_exists("imagick_blob2image")){ /* Get temporary file name for conversation */ $fname = tempnam ("/tmp", "GOsa"); - + /* Open file and write out photoData */ $fp = fopen ($fname, "w"); fwrite ($fp, $this->photoData); @@ -890,7 +896,7 @@ class user extends plugin $query= "convert -size 147x200 $fname -resize 147x200 +profile \"*\" -"; @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $query, "Execute"); - + /* Read data written by convert */ $output= ""; $sh= popen($query, 'r'); @@ -1466,6 +1472,13 @@ class user extends plugin if($this->pw_storage != "{default}"){ $ret['pw_storage'] = $this->pw_storage; } + if($this->jpegPhoto != "{default}"){ + $ret['jpegPhoto'] = $this->jpegPhoto; + $ret['photoData'] = $this->photoData; + $ret['old_jpegPhoto'] = $this->old_jpegPhoto; + $ret['old_photoData'] = $this->old_photoData; + } + $ret['is_modified'] = $this->is_modified; return($ret); } diff --git a/plugins/personal/generic/generic.tpl b/plugins/personal/generic/generic.tpl index d5e1fcbed..be60d8921 100644 --- a/plugins/personal/generic/generic.tpl +++ b/plugins/personal/generic/generic.tpl @@ -104,6 +104,7 @@ {/render} +{if !$multiple_support}
@@ -130,6 +131,8 @@ {/render} +{/if} +{if !$multiple_support} @@ -142,6 +145,7 @@ {/render} +{/if}