From: hickert Date: Wed, 5 Nov 2008 13:27:42 +0000 (+0000) Subject: Fixed saving of application flags. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=710ca7bbad41e161e11c4036695725c69bf4a8d3;p=gosa.git Fixed saving of application flags. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12924 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc index df892ee23..b6caa4d92 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc @@ -62,6 +62,7 @@ class application extends plugin $this->orig_cn = $this->cn; $this->orig_base = $this->base; + $this->gosaApplicationFlags = preg_replace("/[^GDLMO]/","",$this->gosaApplicationFlags); } @@ -312,14 +313,15 @@ class application extends plugin "placeInStartmenu" => "M", "overwriteConfig" => "O"); + /* Save application flags */ foreach($checks as $name => $flag){ if($this->acl_is_writeable($name)){ $set = isset($_POST[$name]) && $_POST[$name] == 1; - if(!$set && preg_match("/".$flag."/",$this->gosaApplicationFlags)){ - $this->gosaApplicationFlags = preg_replace("/".$flag."/","",$this->gosaApplicationFlags); + if(!$set && strstr($this->gosaApplicationFlags,$flag)){ + $this->gosaApplicationFlags = str_replace($flag,"",$this->gosaApplicationFlags); }elseif($set && !preg_match("/".$flag."/",$this->gosaApplicationFlags)){ - $this->gosaApplicationFlags = preg_replace("/]/",$flag."]",$this->gosaApplicationFlags); + $this->gosaApplicationFlags .= $flag; } } } @@ -474,6 +476,7 @@ class application extends plugin /* Get application script without header part, to check if we must save the script itself */ $script = preg_replace('/.*### END HEADER ###/s', '', $this->gotoLogonScript); + $this->gosaApplicationFlags ="[{$this->gosaApplicationFlags}]"; plugin::save(); $this->attrs["gosaApplicationIcon"]= $this->gosaApplicationIcon;