Code

Updated licenses
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Sep 2009 12:43:22 +0000 (12:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Sep 2009 12:43:22 +0000 (12:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14311 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsiLicenses/class_licenceGeneric.inc
gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenses.inc
gosa-plugins/opsi/admin/opsiLicenses/tabs_licenses.inc [new file with mode: 0644]

index 41ced8d7645611eaab2cc580e7c12be5719567cf..eacafcd1407ae5d91c5316334302d4a92209e41f 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 
-class opsiLicens extends plugin {
+class licenseGeneric extends plugin {
 
   // The variables this plugin takes care of.
   var $cn = "";
index 564219a7cedfd70f426ae981358a90f792356668..69d28d08b303e18e08a029acc74b70dc486cae85 100644 (file)
@@ -159,13 +159,10 @@ class opsiLicenses extends plugin
 
         $acl = $this->ui->get_permissions($dn, "opsi/licenseGeneric");
         if (preg_match('/d/', $acl)){
-
-          echo "<br><b>Delete ".$dn."</b>";
-
-#         /* Delete request is permitted, perform LDAP action */
-#         $this->dialog= new licensetabs($this->config,$this->config->data['TABS']['LICENSETABS'], $dn);
-#         $this->dialog->delete();
-#         $this->dialog= NULL;
+          $this->dialog = new licenseTabs($this->config, $this->config->data['TABS']['OPSILICENSETABS'],$dn, "opsi");
+          $this->dialog->set_acl_base($this->config->current['BASE']);
+          $this->dialog->delete();
+          $this->dialog= NULL;
         } else {
 
           /* Normally this shouldn't be reached, send some extra
@@ -186,11 +183,9 @@ class opsiLicenses extends plugin
      ***************/
 
     if($s_action == "new" && !$this->dialog instanceOf tabs){
-
-      echo "<br><b>Delete ".$dn."</b>";
-
- #    $this->dialog = new licensetabs($this->config, $this->config->data['TABS']['LICENSETABS'], "new");
- #    $this->dialog->set_acl_base($this->config->current['BASE']);
+      $this->dn = "new";
+      $this->dialog = new licenseTabs($this->config, $this->config->data['TABS']['OPSILICENSETABS'],$this->dn, "opsi");
+      $this->dialog->set_acl_base($this->config->current['BASE']);
     }
     
     /***************
@@ -205,13 +200,11 @@ class opsiLicenses extends plugin
         $entry = $this->licenses[$s_entry];
         $this->dn = $entry['dn'];
 
-        echo "<br><b>Edit ".$dn."</b>";
-
-#       /* Open the dialog */
-#       $this->dialog = new licensetabs($this->config, $this->config->data['TABS']['LICENSETABS'], 
-#           $entry['dn'], "opsi");
-#       $this->dialog->set_acl_base($this->config->current['BASE']);
-#       set_object_info($this->dn);
+        /* Open the dialog */
+        $this->dialog = new licenseTabs($this->config, $this->config->data['TABS']['OPSILICENSETABS'], 
+            $entry['dn'], "opsi");
+        $this->dialog->set_acl_base($this->config->current['BASE']);
+        set_object_info($this->dn);
       }
     }
 
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/tabs_licenses.inc b/gosa-plugins/opsi/admin/opsiLicenses/tabs_licenses.inc
new file mode 100644 (file)
index 0000000..db2ca07
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+class licenseTabs extends tabs {};
+
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>