X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgoto%2Fadmin%2Fsystems%2Fgoto%2Fclass_workstationStartup.inc;h=fc29543b07e6e34eb6ff4f57dfb75e50cec0f1b2;hb=a06c47716e539f260a3d19f5d8bb36dc80bf0e2d;hp=a7c7707e214af2a0afef850588c32735568f09be;hpb=59b621809c6442b8a1e46cf16b79fb0c3f46387b;p=gosa.git diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index a7c7707e2..fc29543b0 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -103,6 +103,8 @@ class workstartup extends plugin $this->gotoLdapServers[] = preg_replace("/^[0-9]*:/","",$value); } } + natcasesort($this->gotoLdapServerList); + if(!count($this->gotoLdapServers) && $this->member_of_ogroup){ $this->gotoLdap_inherit = TRUE; } @@ -187,8 +189,6 @@ class workstartup extends plugin /* Handle inheritance value "default" */ if ($this->member_of_ogroup){ $this->gotoBootKernels= array("default-inherited" => '['._("inherited").']'); - }else{ - $this->gotoBootKernels= array("default-inherited" => _("default")); } /* If we are member in an object group, @@ -371,7 +371,7 @@ class workstartup extends plugin } if((isset($this->FAIclassInfo[$_POST['FAIclassesSel']]['FAIpartitionTable']))&&($found>0)){ - msg_dialog(_("Error"), _("There is already a profile containing a partition table in your configuration!") , ERROR_DIALOG); + msg_dialog::display(_("Error"), _("There is already a profile containing a partition table in your configuration!") , ERROR_DIALOG); }else{ $this->FAIclass[$_POST['FAIclassesSel']]=$_POST['FAIclassesSel']; } @@ -479,7 +479,7 @@ class workstartup extends plugin if((isset($_POST['gotoShareAdd'])) && ($this->acl_is_writeable("gotoShare"))) { /* We assign a share to this user, if we don't know where to mount the share */ if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){ - msg_dialog(_("Error"), msgPool::required(_("Mount point")), ERROR_DIALOG); + msg_dialog::display(_("Error"), msgPool::required(_("Mount point")), ERROR_DIALOG); }else{ if(count($this->gotoAvailableShares)){ $a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']]; @@ -558,7 +558,7 @@ class workstartup extends plugin } /* Convert old style entry */ - if (!preg_match('%:ldap://%', $server)){ + if (!preg_match('%:ldaps?://%', $server)){ $server= "ldap://".preg_replace('/^([^:]+):/', '\1/', $server); /* Beautify new style entries */ @@ -586,7 +586,7 @@ class workstartup extends plugin if(!in_array($entry,$this->gotoLdapServers)){ /* Convert old style entry */ - if (!preg_match('%:ldap://%', $entry)){ + if (!preg_match('%:ldap[s]*://%', $entry)){ $entry= "ldap://".preg_replace('/^([^:]+):/', '\1/', $entry); /* Beautify new style entries */ @@ -882,7 +882,7 @@ class workstartup extends plugin } } - if (($this->attrs['gotoBootKernel'] == "default-inherited") || ($this->attrs['gotoBootKernel'] == "%default%")){ + if ($this->attrs['gotoBootKernel'] == "default-inherited"){ $this->attrs['gotoBootKernel']= array(); } @@ -906,8 +906,13 @@ class workstartup extends plugin $this->attrs['FAIclass'] = array(); $this->attrs['FAIdebianMirror'] = array(); } - } + }else{ + /* Don't touch FAI objects if something went wrong with the si daemon. + */ + if(isset($this->attrs['FAIclass'])) unset($this->attrs['FAIclass']); + if(isset($this->attrs['FAIdebianMirror'])) unset($this->attrs['FAIdebianMirror']); + } /* prepare share settings */ $tmp = array(); @@ -1209,6 +1214,7 @@ class workstartup extends plugin $this->cache['KERNELS'][$release][$kernel]=$kernel; } } + ksort($this->cache['KERNELS'][$release]); } @@ -1319,9 +1325,9 @@ class workstartup extends plugin $res = shell_exec($cmd); $res2 = trim($res); if((!$res)){ - msg_dialog(_("Configuration error"), msgPool::cmdexecfailed("REPOSITORY_HOOK", $cmd), ERROR_DIALOG); + msg_dialog::display(_("Configuration error"), msgPool::cmdexecfailed("REPOSITORY_HOOK", $cmd), ERROR_DIALOG); }elseif(empty($res2)){ - msg_dialog(_("Configuration error"), _("REPOSITORY_HOOK returned no result!"), ERROR_DIALOG); + msg_dialog::display(_("Configuration error"), _("REPOSITORY_HOOK returned no result!"), ERROR_DIALOG); }else{ $tmp = split("\n",$res); foreach($tmp as $line){