X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgoto%2Fpersonal%2Fenvironment%2Fclass_environment.inc;h=b72ced3ce70b2584673ccef8f447eb45cba48c2d;hb=fd16381bbcb916810fe1c4899ff0fdd52f5e8dd3;hp=80270b74f620865d41ab4a40b0e603565d81bf51;hpb=6adcd9fd7d799a2e07a773097f2af8196e0d14b4;p=gosa.git diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc index 80270b74f..b72ced3ce 100644 --- a/gosa-plugins/goto/personal/environment/class_environment.inc +++ b/gosa-plugins/goto/personal/environment/class_environment.inc @@ -147,7 +147,7 @@ class environment extends plugin unset($this->attrs['gotoLogonScript']['count']); foreach($this->attrs['gotoLogonScript'] as $device){ $tmp = $tmp2 = array(); - $tmp = split("\|",$device); + $tmp = explode("|",$device); $tmp2['LogonName'] = $tmp[0]; $tmp2['LogonPriority'] = $tmp[2]; if(preg_match("/O/i",$tmp[1])){ @@ -171,7 +171,7 @@ class environment extends plugin unset($this->attrs['gotoShare']['count']); foreach($this->attrs['gotoShare'] as $share){ $tmp = $tmp2 = array(); - $tmp = split("\|",$share); + $tmp = explode("|",$share); $tmp2['server'] =$tmp[0]; $tmp2['name'] =$tmp[1]; @@ -217,12 +217,12 @@ class environment extends plugin "1280x768" => "1280x768", "1280x1024" => "1280x1024"); - if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){ - $file = $this->config->data['MAIN']['RESOLUTION_HOOK']; + if($this->config->get_cfg_value("resolutions") != ""){ + $file = $this->config->get_cfg_value("resolutions"); if(is_readable($file)){ $str = file_get_contents($file); - $lines = split("\n",$str); + $lines = preg_split("/\n/",$str); foreach($lines as $line){ $line = trim($line); if(!empty($line)){ @@ -996,7 +996,6 @@ class environment extends plugin } $smarty->assign("gotoPrinter",$this->printOutPrinterDevices()); - $smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices())); /* General behavior */ if(is_object($this->dialog)){ @@ -1241,7 +1240,7 @@ class environment extends plugin /* Prepare HotPlug devices */ $this->attrs['gotoHotplugDeviceDN'] = array(); foreach($this->gotoHotplugDevices as $name => $device){ - $this->attrs['gotoHotplugDeviceDN'][]= $device['dn']; + $this->attrs['gotoHotplugDeviceDN'][]= LDAP::fix($device['dn']); } /* Prepare LogonScripts */ @@ -1360,7 +1359,7 @@ class environment extends plugin if(is_array($this->gotoPrinter)){ foreach($this->gotoPrinter as $printer){ - if($printer['mode'] == "admin"){ + if($printer['mode'] == 'admin'){ $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Administrator"); }else{ $a_return[$printer['cn'][0]]= $printer['cn'][0]; @@ -1370,6 +1369,7 @@ class environment extends plugin } } } + asort($a_return); return($a_return); } @@ -1428,7 +1428,7 @@ class environment extends plugin unset($this->multi_attrs_all['gotoShare']['count']); foreach($this->multi_attrs_all['gotoShare'] as $share){ $tmp = $tmp2 = array(); - $tmp = split("\|",$share); + $tmp = explode("|",$share); $tmp2['server'] =$tmp[0]; $tmp2['name'] =$tmp[1]; @@ -1459,7 +1459,7 @@ class environment extends plugin unset($this->multi_attrs['gotoShare']['count']); foreach($this->multi_attrs['gotoShare'] as $share){ $tmp = $tmp2 = array(); - $tmp = split("\|",$share); + $tmp = explode("|",$share); $tmp2['server'] =$tmp[0]; $tmp2['name'] =$tmp[1]; @@ -1491,7 +1491,7 @@ class environment extends plugin unset($this->multi_attrs_all['gotoLogonScript']['count']); foreach($this->multi_attrs_all['gotoLogonScript'] as $device){ $tmp = $tmp2 = array(); - $tmp = split("\|",$device); + $tmp = explode("|",$device); $tmp2['LogonName'] = $tmp[0]; $tmp2['LogonPriority'] = $tmp[2]; if(preg_match("/O/i",$tmp[1])){ @@ -1516,7 +1516,7 @@ class environment extends plugin unset($this->multi_attrs['gotoLogonScript']['count']); foreach($this->multi_attrs['gotoLogonScript'] as $device){ $tmp = $tmp2 = array(); - $tmp = split("\|",$device); + $tmp = explode("|",$device); $tmp2['LogonName'] = $tmp[0]; $tmp2['LogonPriority'] = $tmp[2]; if(preg_match("/O/i",$tmp[1])){