summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 76370b3)
raw | patch | inline | side by side (parent: 76370b3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Jun 2005 10:43:27 +0000 (10:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Jun 2005 10:43:27 +0000 (10:43 +0000) |
plugins/admin/systems/class_phoneGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index dddc9499a37c0315031b0baf4c7466b40dbbfee0..ddaeb30bfb4f321cde709cf8ee4d8817e4997abe 100644 (file)
/* deativate all fields that are not used by the specified type */
foreach($this->attributes as $att){
- if(!in_array($att,$this->usedattrs[$this->selected_categorie])){
+ if((!in_array($att,$this->usedattrs[$this->selected_categorie]))||(chkacl($this->acl,$att)!="")){
$smarty->assign($att."USED", "disabled" );
+ $smarty->assign($att, "");
}else{
$smarty->assign($att."USED", "" );
+ $smarty->assign($att, $this->$att);
}
}
-
+
+ $smarty->assign("selected_categorie",$this->selected_categorie);
/* Assign attributes */
foreach ($this->attributes as $attr){
$smarty->assign($attr."ACL", chkacl($this->acl, $attr));
- $smarty->assign("$attr", $this->$attr);
}
$smarty->assign("base_select", $this->base);
/* Remove all unwanted attrs */
foreach($this->attributes as $att){
+
+ /* Check all attributes, if they are needed for this type of phone */
if(!in_array($att,$this->usedattrs[$mode])){
$this->attrs[$att] = array();
}
+
+ /* Test rights of this user ... */
+ if(chkacl($this->acl,$att)!=""){
+ unset($this->attrs[$att]);
+ }
}
/* unset the categorie*/