Code

Updated environment profile server list
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Aug 2006 06:00:31 +0000 (06:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Aug 2006 06:00:31 +0000 (06:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4405 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_config.inc
plugins/personal/environment/class_environment.inc
plugins/personal/environment/main.inc

index 13c87c11db9f1f6fde76db4e29c476deaffc85d2..169b576aad29384a51a7c8f67121e39b80b259d8 100644 (file)
@@ -664,14 +664,18 @@ class config  {
   }
 
   /* This function returns all available ShareServer */
-  function getShareServerList()
+  function getShareServerList($categories = "")
   {
     global $config;
     $return = array();
     $ui = get_userinfo();
     $base = $config->current['BASE'];
-echo "Need to adapt share list loading<br>";
-    $res= get_list("(&(objectClass=goShareServer)(goExportEntry=*))", "all", $base,array("goExportEntry","cn"),GL_SUBSEARCH);
+
+    if(empty($categories)){
+      echo "Need to adapt share list loading<br>";
+    }
+
+    $res= get_list("(&(objectClass=goShareServer)(goExportEntry=*))", $categories, $base,array("goExportEntry","cn"),GL_SUBSEARCH);
     foreach($res as $entry){
       if(isset($entry['goExportEntry']['count'])){
         unset($entry['goExportEntry']['count']);
index 976ebd641aa8c64bda031b32d28851d1fb4a2f2f..d551a3b7cc7c505fef9525eaec2eeb6baf76c6fc 100644 (file)
@@ -228,8 +228,7 @@ class environment extends plugin
       }
     }
 
-
-    $this->gotoProfileServers= $config->getShareServerList() ;
+    $this->gotoProfileServers= $config->getShareServerList("server") ;
     $this->gotoShareSelections= $config->getShareList(true);
     $this->gotoAvailableShares= $config->getShareList(false);  
 
index 0af0fb11e772f14bb2665be16a299f4701b8abf3..06b14f2650485a209e179d8c1eaa83ee8ea4d673 100644 (file)
@@ -99,14 +99,12 @@ if (!$remove_lock){
              "\"> ".$ui->dn."&nbsp;";
     } else {
       $info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/openlock.png').
-             "\"> ".$ui->dn."&nbsp;";
-  #      if (isset($editacl) && $editacl != "#none#"){
-      $display .=  "FIxme, only display edit button if there is at least one attribute writeable";
+        "\"> ".$ui->dn."&nbsp;";
+      if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/environment"))){
         $info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png').
-            "\"> "._("Click the 'Edit' button below to change informations in this dialog");
+          "\"> "._("Click the 'Edit' button below to change informations in this dialog");
         $display.= "<input type=submit name=\"edit\" value=\""._("Edit")."\">\n";
-   #   }
-
+      }
       $display.= "<input type=\"hidden\" name=\"ignore\">\n";
     }
     $display.= "</p>\n";