summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8527273)
raw | patch | inline | side by side (parent: 8527273)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Aug 2006 10:34:00 +0000 (10:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Aug 2006 10:34:00 +0000 (10:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4440 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history | |
plugins/gofon/phoneaccount/main.inc | patch | blob | history |
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index dd5d5591d42403258e2249ce5f204dac019d155a..c20d7cf4d5d0bbc4758ebcc656b1843371822f23 100644 (file)
$nummsinorder=array("");
}
+
+ /* Save checkbox */
+ $tmp = preg_replace("/[^a-z]/i","",$this->goFonDeliveryMode);
+ if($this->acl_is_writeable("goFonDeliveryMode")){
+ if(isset($_POST['fon_to_mail']) && !preg_match("/M/",$this->goFonDeliveryMode)){
+ $tmp .= "M";
+ }elseif(!isset($_POST['fon_to_mail']) && preg_match("/M/",$this->goFonDeliveryMode)){
+ $tmp = preg_replace ("/M/","",$tmp);
+ }
+ }
+ $this->goFonDeliveryMode= "[".$tmp."]";
+
+
+
/* get all Postvars */
if(isset($this->macroarray[$this->macro])){
if($this->acl_is_writeable("goFonMarco")){
index 62675fd740cb740b160a28a986255c4ac137bf60..aed88aa7c94b87b7d86297a983ceaba8049d0fe8 100644 (file)
/* Create phoneAccount object on demand */
if (!isset($_SESSION['phoneAccount']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
$_SESSION['phoneAccount']= new phoneAccount ($config, $ui->dn);
+ $_SESSION['phoneAccount']->set_acl_base($ui->dn);
+ $_SESSION['phoneAccount']->set_acl_category("users");
}
$phoneAccount= $_SESSION['phoneAccount'];
$_SESSION['edit']= TRUE;
}
- /* Adjust acl's to mode */
- if (isset($_SESSION['edit'])){
- $acl= get_permissions ($ui->dn, $ui->subtreeACL);
- $phoneAccount->acl= get_module_permission($acl, "phoneAccount", $ui->dn);
- } else {
- $acl= get_permissions ($ui->dn, $ui->subtreeACL);
- $editacl= get_module_permission($acl, "phoneAccount", $ui->dn);
- $phoneAccount->acl="#none#";
- }
-
/* save changes to LDAP and disable edit mode */
if (isset($_POST['edit_finish'])){
if (count ($message) == 0){
$phoneAccount->save ();
- $phoneAccount->acl="#none#";
gosa_log ("User/phone object'".$ui->dn."' has been saved");
del_lock ($ui->dn);
sess_del ('edit');
$info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png')."\"> ".$ui->dn." ";
} else {
$info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/openlock.png')."\"> ".$ui->dn." ";
- if (isset($editacl) && $editacl != "#none#"){
+
+ if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/phoneAccount"))){
$info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png')."\">"._("Click the 'Edit' button below to change informations in this dialog");
$display.= "<input type=submit name=\"edit\" value=\""._("Edit")."\">\n";
}