Code

Updated workstation startup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Sep 2008 10:11:08 +0000 (10:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Sep 2008 10:11:08 +0000 (10:11 +0000)
-Fixed Problem with share selection, shares were not displayed-

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12497 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc

index 2084bb9a851273adf6e02b01c1fa1ed2a3fb228b..21e664edef799d2c507bc12c8bb3782b8ed5cee3 100644 (file)
@@ -179,7 +179,7 @@ class workstartup extends plugin
       }
     }
 
-    $this->otoShareSelections= $config->getShareList(true);
+    $this->gotoShareSelections= $config->getShareList(true);
     $this->gotoAvailableShares= $config->getShareList(false);
     $tmp2 = array();
   
@@ -466,12 +466,13 @@ class workstartup extends plugin
     /* 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 */