From: hickert Date: Fri, 26 Aug 2005 11:37:47 +0000 (+0000) Subject: Fixed shareserver list X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5fd3c9dbfdd14ceeb264f3c784834027e2d30fd4;p=gosa.git Fixed shareserver list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1230 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index cd023e850..248595e9b 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -244,7 +244,7 @@ class environment extends plugin } $this->gotoXResolutions = array("640x480","800x600","1024x768","1280x768","1280x1024"); - $this->gotoProfileServers = array("none","none1"); + $this->gotoProfileServers =$this->getShareServerList() ; $smarty->assign("gotoXResolutions",$this->gotoXResolutions); $smarty->assign("gotoProfileServers",$this->gotoProfileServers); @@ -802,22 +802,38 @@ class environment extends plugin $a_res = $ldap->search("(objectClass=goShareServer)",array("goExportEntry")); $return= array(); while($entry = $ldap->fetch($a_res)){ - $shareAttrs = split("\|",$entry['goExportEntry'][0]); - if($listboxEntry) { - $return[$shareAttrs[0]] = $shareAttrs[0]." - ".$shareAttrs[4]; - }else{ - $return[$shareAttrs[0]]['name'] = $shareAttrs[0]; - $return[$shareAttrs[0]]['description'] = $shareAttrs[1]; - $return[$shareAttrs[0]]['type'] = $shareAttrs[2]; - $return[$shareAttrs[0]]['charset'] = $shareAttrs[3]; - $return[$shareAttrs[0]]['path'] = $shareAttrs[4]; - $return[$shareAttrs[0]]['option'] = $shareAttrs[5]; + unset($entry['goExportEntry']['count']); + foreach($entry['goExportEntry'] as $export){ + $shareAttrs = split("\|",$export); + if($listboxEntry) { + $return[$shareAttrs[0]] = $shareAttrs[0]." - ".$shareAttrs[4]; + }else{ + $return[$shareAttrs[0]]['name'] = $shareAttrs[0]; + $return[$shareAttrs[0]]['description'] = $shareAttrs[1]; + $return[$shareAttrs[0]]['type'] = $shareAttrs[2]; + $return[$shareAttrs[0]]['charset'] = $shareAttrs[3]; + $return[$shareAttrs[0]]['path'] = $shareAttrs[4]; + $return[$shareAttrs[0]]['option'] = $shareAttrs[5]; + } } } return($return); } +/* This function returns all available ShareServer + */ + function getShareServerList() + { + $ldap= $this->config->get_ldap_link(); + $a_res = $ldap->search("(objectClass=goShareServer)",array("goExportEntry","cn")); + $return= array(); + while($entry = $ldap->fetch($a_res)){ + $return[$entry['cn'][0]] = $entry['cn'][0]; + } + return($return); + } + /* Generate ListBox frindly output for the defined shares * Possibly Add or remove an attribute here, */ diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc index f7b5d86ca..4d2663f46 100644 --- a/plugins/personal/environment/class_kioskManagementDialog.inc +++ b/plugins/personal/environment/class_kioskManagementDialog.inc @@ -51,7 +51,7 @@ class kioskManagementDialog extends plugin * Delete selected file form $this->baseDir */ if((isset($_POST['profileDel']))&&(isset($_POST['gotoKioskProfile']))){ - $filename = $this->baseDir.$_POST['gotoKioskProfile']; + $filename = $this->baseDir."/".$_POST['gotoKioskProfile']; $res = @unlink($filename); if(!$res){