diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index ef3fa586a94c316aa6bf02ea7e7b25503d93ca30..ea4db08a490e13d67b80f8cc1c65ac5ff10d370c 100644 (file)
{
/* Check if FAI is active */
$tmp= $config->search("faiManagement", "CLASS",array('menu','tabs'));
- if(!empty($tmp)){
+ if(!empty($tmp) && class_available("faiManagement")){
$this->fai_activated = TRUE;
}else{
$this->attributes = array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters", "gotoShare");
}
}
- $this->otoShareSelections= $config->getShareList(true);
+ $this->gotoShareSelections= $config->getShareList(true);
$this->gotoAvailableShares= $config->getShareList(false);
$tmp2 = array();
$this->update_fai_cache();
}
}
-
-# /* Get list of boot kernels */
-# if (isset($this->config->data['TABS'])){
-# $command= $this->config->search(get_class($this), "KERNELS",array('tabs'));
-# if (!check_command($command)){
-# $message[]= sprintf(_("Command '%s', specified as KERNELS hook for plugin '%s' doesn't seem to exist."), $command,
-# get_class($this));
-# } else {
-# $fh= popen($command, "r");
-# while (!feof($fh)) {
-# $buffer= trim(fgets($fh, 256));
-# if(!empty($buffer)){
-# $name=$value = $buffer;
-# if(preg_match("/:/",$buffer)){
-# $name = preg_replace("/:.*$/","",$buffer);
-# $value= preg_replace("/^.*:/","",$buffer);
-# $this->gotoBootKernels[$name]= $name.":".$value;
-# }else{
-# $this->gotoBootKernels[$name]= $value;
-# }
-# }
-# }
-# pclose($fh);
-# }
-# }
-#
-# /* Turn to default, if we've nothing to inherit */
-# if (!isset($this->gotoBootKernels['default-inherited']) && $this->gotoBootKernel == "default-inherited"){
-# $this->gotoBootKernel= "default";
-# }
}
/* Add module */
if (isset ($_POST['add_module'])){
- if ($_POST['module'] != "" && $this->acl_is_writeable("gotoModule")){
+ if ($_POST['module'] != "" && $this->acl_is_writeable("gotoModules")){
$this->add_list ($this->gotoModules, $_POST['module']);
}
}
/* Delete module */
if (isset ($_POST['delete_module'])){
- if (count($_POST['modules_list']) && $this->acl_is_writeable("gotoModule")){
+ if (count($_POST['modules_list']) && $this->acl_is_writeable("gotoModules")){
$this->del_list ($this->gotoModules, $_POST['modules_list']);
}
}
/* if $_POST['gotoShareAdd'] is set, we will try to add a new entry
* This entry will be, a combination of mountPoint and sharedefinitions
*/
- if((isset($_POST['gotoShareAdd'])) && ($this->acl_is_writeable("gotoShare"))) {
+ if((isset($_POST['gotoShareAdd'])) && isset($_POST['gotoShareSelection']) && ($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::display(_("Error"), msgPool::required(_("Mount point")), ERROR_DIALOG);
}else{
- if(count($this->gotoAvailableShares)){
+
+ if(isset($this->gotoAvailableShares[$_POST['gotoShareSelection']])){
$a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];
$s_mount = $_POST['gotoShareMountPoint'];
/* Preparing the new assignment */
return;
}else{
foreach($tmp as $entry){
- $rel = $entry['RELEASE'];
+ $rel = $entry['FAI_RELEASE'];
$this->cache['SERVERS']['auto'][$rel] = $rel;
$this->cache['SERVERS'][$entry['SERVER']][$rel] = $rel;
uksort($this->cache['SERVERS']['auto'], 'strnatcasecmp');
function GetHookElements()
{
$ret = array();
- $cmd= $this->config->search("servrepository", "REPOSITORY_HOOK",array('tabs'));
+ $cmd= $this->config->search("servrepository", "repositoryBranchHook",array('tabs'));
if(!empty($cmd)){
$res = shell_exec($cmd);
$res2 = trim($res);
if((!$res)){
- msg_dialog::display(_("Configuration error"), msgPool::cmdexecfailed("REPOSITORY_HOOK", $cmd), ERROR_DIALOG);
+ msg_dialog::display(_("Configuration error"), msgPool::cmdexecfailed("repositoryBranchHook", $cmd), ERROR_DIALOG);
}elseif(empty($res2)){
- msg_dialog::display(_("Configuration error"), _("REPOSITORY_HOOK returned no result!"), ERROR_DIALOG);
+ msg_dialog::display(_("Configuration error"), _("repositoryBranchHook returned no result!"), ERROR_DIALOG);
}else{
$tmp = split("\n",$res);
foreach($tmp as $line){