Code

Prepared folder List
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 09:40:16 +0000 (09:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 09:40:16 +0000 (09:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19998 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/admin/groups/GroupwareSharedFolder/class_GroupwareSharedFolder.inc
gosa-plugins/groupware/admin/groups/GroupwareSharedFolder/generic.tpl

index d48090bab8e457d5cf043850a330face3cc837e3..16b50834727cdcc8b7ca3d9da0cc55e1cdefc4f9 100644 (file)
@@ -51,31 +51,33 @@ class GroupwareSharedFolder extends plugin
      */
     function init()
     {
-        // Detect supported capabilities 
-        $rpc = $this->config->getRpcHandle();
-        $capabilities = $rpc->gwGetCapabilities();
-        if(!$rpc->success()){
-            $this->rpcError = TRUE;
-            $this->rpcErrorMessage = $rpc->get_error();
-            $message = sprintf(_("Failed to load supported capabilities from server! Error was: '%s'."), 
-                    $rpc->get_error());
-            msg_dialog::display(_("Error"),msgPool::rpcError($message), ERROR_DIALOG);
-            return;
-        }
+#       // Detect supported capabilities 
+#       $rpc = $this->config->getRpcHandle();
+#       $capabilities = $rpc->gwGetCapabilities();
+#       if(!$rpc->success()){
+#           $this->rpcError = TRUE;
+#           $this->rpcErrorMessage = $rpc->get_error();
+#           $message = sprintf(_("Failed to load supported capabilities from server! Error was: '%s'."), 
+#                   $rpc->get_error());
+#           msg_dialog::display(_("Error"),msgPool::rpcError($message), ERROR_DIALOG);
+#           return;
+#       }
+#
+#       // Detect features we can use
+#       $map['folder'] = array("folderList","folderAdd","folderDel","folderExists");
+#       $map['members'] = array("folderGetMembers","folderSetMembers","folderAddMember","folderDelMember");
+#       foreach($map as $name => $required){
+#           $this->featuresEnabled[$name] = TRUE;
+#           foreach($required as $func){
+#               $this->featuresEnabled[$name] &= isset($capabilities[$func]) && $capabilities[$func];
+#           }
+#       }
 
-        // Detect features we can use
-        $map['folder'] = array("folderList","folderAdd","folderDel","folderExists");
-        $map['members'] = array("folderGetMembers","folderSetMembers","folderAddMember","folderDelMember");
-        foreach($map as $name => $required){
-            $this->featuresEnabled[$name] = TRUE;
-            foreach($required as $func){
-                $this->featuresEnabled[$name] &= isset($capabilities[$func]) && $capabilities[$func];
-            }
-        }
 
         // If we're creating a new ogroup, then we definately have no extension yet.
         $this->rpcError = FALSE;
         $folderList = array();
+        $is_account = FALSE;
         if($this->cn == "" || $this->dn == "new"){
             $is_account = FALSE;
         }else{
@@ -146,7 +148,14 @@ class GroupwareSharedFolder extends plugin
           Generate HTML output
          ****************/
 
+        $plInfo = $this->plInfo();
+
         $smarty = get_smarty();
+
+        foreach($plInfo['plProvidedAcls'] as $name => $translation){
+            $smarty->assign("{$name}ACL", $this->getacl($name));
+        }
+
         $smarty->assign('rpcError' , $this->rpcError);
         $smarty->assign('rpcErrorMessage' , $this->rpcErrorMessage);
         return($display.$smarty->fetch(get_template_path('GroupwareSharedFolder/generic.tpl', TRUE)));
@@ -177,10 +186,10 @@ class GroupwareSharedFolder extends plugin
      */ 
     function save_object()
     {
+        if(isset($_POST['retryInit'])){
+            $this->init();
+        }
         if(isset($_POST['GroupwareSharedFolder_posted'])){
-            if(isset($_POST['retryInit'])){
-                $this->init();
-            }
             plugin::save_object();
         }
     }
index 31470dd6312693e6535a0d304af86b07d35a3269..6c306ef9a1767d340580890df8e0aab0ebc03886 100644 (file)
@@ -13,4 +13,4 @@
     </tr>
 </table>
 
-<input type="hidden" name="DistributionList_posted" value="1">
+<input type="hidden" name="GroupwareSharedFolder_posted" value="1">