summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec7d381)
raw | patch | inline | side by side (parent: ec7d381)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 May 2008 09:28:06 +0000 (09:28 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 May 2008 09:28:06 +0000 (09:28 +0000) |
-The mode was always active. It was hardcoded to true?
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10786 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10786 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/generic/class_user.inc | patch | blob | history |
diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc
index 3ae5f62140f2337d31bfa8330e215cb6102d2640..f32f662f9acd0e8c8fcdfbb921b4745929523efb 100644 (file)
var $multiple_support = TRUE;
+ var $governmentmode = FALSE;
+
/* constructor, if 'dn' is set, the node loads the given
'dn' from LDAP */
function user (&$config, $dn= NULL)
{
$this->config= $config;
/* Configuration is fine, allways */
- if ($this->config->current['GOVERNMENTMODE']){
+ if (isset($this->config->current['GOVERNMENTMODE']) && preg_match("/true/i",$this->config->current['GOVERNMENTMODE'])){
+ $this->governmentmode = TRUE;
$this->attributes=array_merge($this->attributes,$this->govattrs);
}
$this->orig_dn = $this->dn;
$this->new_dn = $dn;
- if ($this->config->current['GOVERNMENTMODE']){
+ if ($this->governmentmode){
/* Fix public visible attribute if unset */
if (!isset($this->attrs['publicVisible'])){
$this->publicVisible == "nein";
}
/* Load government mode attributes */
- if ($this->config->current['GOVERNMENTMODE']){
+ if ($this->governmentmode){
/* Copy all attributs */
foreach ($this->govattrs as $val){
if (isset($this->attrs["$val"][0])){
$smarty->assign($cert."_state","");
}
}
- $this->config->current['GOVERNMENTMODE'] = "true";
- if (isset($this->config->current['GOVERNMENTMODE']) &&
- preg_match('/true/i', $this->config->current['GOVERNMENTMODE'])){
+
+ if($this->governmentmode){
$smarty->assign("governmentmode", "true");
}else{
$smarty->assign("governmentmode", "false");
$smarty->assign("bases", $tmp);
/* Save government mode attributes */
- if (isset($this->config->current['GOVERNMENTMODE']) &&
- preg_match('/true/i', $this->config->current['GOVERNMENTMODE'])){
+ if($this->governmentmode){
$smarty->assign("governmentmode", "true");
$ivbbmodes= array("nein", "ivbv", "testa", "ivbv,testa", "internet",
"internet,ivbv", "internet,testa", "internet,ivbv,testa");
plugin::save_object ();
/* Save government mode attributes */
- if ($this->config->current['GOVERNMENTMODE']){
+ if ($this->governmentmode){
foreach ($this->govattrs as $val){
if ($this->acl_is_writeable($val,(!is_object($this->parent) && !session::is_set('edit'))) && isset($_POST["$val"])){
$data= stripcslashes($_POST["$val"]);
}
/* Hard coded government mode? */
- if ($this->config->current['GOVERNMENTMODE'] != 'false'){
+ if ($this->governmentmode){
$this->attrs['objectClass'][]= "ivbbentry";
/* Copy standard attributes */
/* Get base */
$this->base= preg_replace('/^[^,]+,'.get_people_ou().'/i', '', $dn);
- if ($this->config->current['GOVERNMENTMODE']){
+ if($this->governmentmode){
/* Walk through govattrs */
foreach ($this->govattrs as $val){