summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 57f1651)
raw | patch | inline | side by side (parent: 57f1651)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Oct 2005 06:41:02 +0000 (06:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Oct 2005 06:41:02 +0000 (06:41 +0000) |
Some attributes removed from this->attributes
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1577 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1577 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index f4f9b04296ef49e0a89337c7440d935d3fae5a63..01a3f0c32c8e882f4739adee9451c147fb0dd04d 100644 (file)
/* general settings */
// Sets the attributes which will kept on page reload, which will be saved, ...
var $attributes = array("uid","useProfile","gotoProfileServer","gotoProfileServers","gotoProfileFlags","gotoProfileFlag_C",
- "gotoXResolution","gotoXResolutions","gotoProfileFlag_L","gotoProfileQuota",
+ "gotoXResolution","gotoProfileFlag_L","gotoProfileQuota",
"gotoLogonScripts","gotoLogonScript",
- "gotoPrinters","gotoPrinter",
+ "gotoPrinters",
"gotoShares","gotoShare","gotoShareSelections",
"gotoKioskProfile","gotoKioskProfiles",
- "gotoHotplugDevice","gotoHotplugDevices");
+ "gotoHotplugDevices");
var $objectclasses = array("gotoEnvironment"); // Specifies the objectClass which contains the attributes edited here
var $cn;
$this->gotoPrinters[$printer['cn'][0]]=$printer;
$this->gotoPrinters[$printer['cn'][0]]['mode']="admin";
}
-
+
/* prepare hotplugs */
if((isset($this->attrs['gotoHotplugDevice']))&&(is_array($this->attrs['gotoHotplugDevice']))){
unset($this->attrs['gotoHotplugDevice']['count']);
*/
$smarty->assign("is_account","true");
+ $this->is_group = false;
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
$this->is_account= !$this->is_account;
}
}
+
+ foreach(array("gotoHotplugDevice","gotoPrinter") as $s_attr){
+ if(chkacl($this->acl,$s_attr)=="") {
+ $smarty->assign($s_attr."ACL","");
+ }else{
+ $smarty->assign($s_attr."ACL"," disabled ");
+ }
+ }
if($this->acl != "#none#"){
$smarty->assign("useProfileACL","");
$smarty->assign("gotoXResolutions",$this->gotoXResolutions);
$smarty->assign("gotoProfileServers",$this->gotoProfileServers);
+ if(!is_array($this->gotoProfileServers)){
+ $this->gotoProfileServers =array();
+ }
$smarty->assign("gotoProfileServerKeys",array_flip($this->gotoProfileServers));
/* Handle kiosk profiles
*/
$smarty->assign("gotoShareSelections", $this->gotoShareSelections);
+ if(!is_array($this->gotoShareSelections)){
+ $this->gotoShareSelections = array();
+ }
$smarty->assign("gotoShareSelectionKeys", array_flip($this->gotoShareSelections));
/* if $_POST['gotoShareAdd'] is set, we will try to add a new entry
plugin::remove_from_parent();
/* Don't save our template variables */
- $skip = array("useProfile","uid","gotoProfileServers","gotoProfileFlag_C","gotoXResolutions","gotoProfileFlag_L",
- "gotoLogonScripts","gotoPrinters","gotoShares","gotoShareSelections","gotoKioskProfiles","gotoHotplugDevices",
+ $skip = array("useProfile","uid","gotoProfileServers","gotoProfileFlag_C","gotoProfileFlag_L",
+ "gotoLogonScripts","gotoPrinters","gotoShares","gotoKioskProfiles","gotoHotplugDevices",
"gotoPrinter");
/* Skip all these attributes */
foreach($skip as $del){
}
- if(count($this->gotoPrinters)==0){
+
+ /* Deleted printer settings wasn't deleted from ldap ...
+ */
+ //if(count($this->gotoPrinters)==0){
+ if(1==1){
$ldap->search("(&(objectClass=gotoPrinter)(|(goto".$s_suffix."Printer=".$this->uid.")(goto".$s_suffix."AdminPrinter=".$this->uid.")))",array("*"));
while($attr = $ldap->fetch()){
-
- foreach($attr['goto'.$s_suffix.'Printer'] as $key => $user){
- if($this->uid==$user){
- unset($attr['goto'.$s_suffix.'Printer'][$key]);
- }
- }
+ if(isset($attr['goto'.$s_suffix.'Printer'])) {
+ foreach($attr['goto'.$s_suffix.'Printer'] as $key => $user){
+ if($this->uid==$user){
+ unset($attr['goto'.$s_suffix.'Printer'][$key]);
+ }
+ }
+ }
- foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $key => $user){
- if($this->uid==$user){
- unset($attr['goto'.$s_suffix.'AdminPrinter'][$key]);
- }
- }
+ if(isset($attr['goto'.$s_suffix.'AdminPrinter'])){
+ foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $key => $user){
+ if($this->uid==$user){
+ unset($attr['goto'.$s_suffix.'AdminPrinter'][$key]);
+ }
+ }
+ }
$attrs_used = array();
foreach($attr as $key=>$val){
}
$attr= $attrs_used;
$tmp =array();
- foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $print){
- $tmp[]=$print;
+
+ if(isset($attr['goto'.$s_suffix.'AdminPrinter'])){
+ foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $print){
+ $tmp[]=$print;
+ }
}
$attr['goto'.$s_suffix.'AdminPrinter'] = $tmp;
$tmp =array();
- foreach($attr['goto'.$s_suffix.'Printer'] as $print){
- $tmp[]=$print;
+
+ if(isset($attr['goto'.$s_suffix.'Printer'])){
+ foreach($attr['goto'.$s_suffix.'Printer'] as $print){
+ $tmp[]=$print;
+ }
}
$attr['goto'.$s_suffix.'Printer'] = $tmp;
+ if(isset($attr['GOTOADMINPRINTER'])){
+ unset($attr['GOTOADMINPRINTER']);
+ }
+
$ldap->cd($attr['dn']);
unset($attr['dn']);
$ldap->modify($attr);
$attrs_used[$key]=$val;
}
}
+
$attrs= $attrs_used;
/* Filter entries */
$attribute2 = "goto".$s_suffix."AdminPrinter";
}else{
$attribute = "goto".$s_suffix."AdminPrinter";
- $attribute2 = "goto".$s_suffix."UserPrinter";
+ $attribute2 = "goto".$s_suffix."Printer";
}
/* If this user is already assigned to $attribute2
}
}
- if(isset($this->attrs['gotoPrinter'])){
- unset($this->attrs['gotoPrinter']);
- }
-
/* Prepare HotPlug devices */
$this->attrs['gotoHotplugDevice'] = array();
foreach($this->gotoHotplugDevices as $name => $device){