Code

Updated DAK class names.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 08:51:54 +0000 (08:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 08:51:54 +0000 (08:51 +0000)
-Removed _

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

gosa-plugins/dak/addons/dak/class_dak_keyring.inc [deleted file]
gosa-plugins/dak/addons/dak/class_dak_queue.inc [deleted file]
gosa-plugins/dak/addons/dak/class_dak_repository.inc [deleted file]
gosa-plugins/dak/addons/dak/class_dakkeyring.inc [new file with mode: 0644]
gosa-plugins/dak/addons/dak/class_dakqueue.inc [new file with mode: 0644]
gosa-plugins/dak/addons/dak/class_dakrepository.inc [new file with mode: 0644]

diff --git a/gosa-plugins/dak/addons/dak/class_dak_keyring.inc b/gosa-plugins/dak/addons/dak/class_dak_keyring.inc
deleted file mode 100644 (file)
index 89956be..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-<?php
-/*
- * This code is part of GOsa (http://www.gosa-project.org)
- * Copyright (C) 2003-2008 GONICUS GmbH
- *
- * ID: $$Id: class_gotomasses.inc 10967 2008-05-20 13:18:12Z hickert $$
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-
-/*! \brief  The DAK keyring class used to manage DAK keyrings.
-            It provides remove/add key mehtods and lists all keys for a selected server.
- */
-class dak_keyring extends plugin
-{
-  private $Servers          = array();
-  private $selected_Server  = array();
-  private $list             = array();
-  public $attributes        = array("selected_Server");
-
-
-  /*! \brief   Creates a dak_keyring class.
-      @param   The GOsa configuration object. 
-   */
-  public function __construct($config)
-  {
-    plugin::plugin($config,NULL);
-
-    /* Collect release servers and store them
-     */
-    $this->Servers = DAK::get_repositories_by_server($this->config);
-    if(count($this->Servers)){
-      $this->selected_Server  = key($this->Servers);
-    }
-  }
-
-
-  /*! \brief  Create HTML output for this plugin.
-      @return String  HTML output.
-   */
-  public function execute()
-  {
-    if(isset($_POST['search'])){
-      $this->refresh_list();
-    }
-
-    $smarty= get_smarty();
-    $smarty->assign("Servers"         , $this->Servers);
-    $smarty->assign("selected_Server" , $this->selected_Server);
-    $smarty->assign("list",$this->CreateList());
-    return($smarty->fetch (get_template_path('dak_keyring.tpl', TRUE, dirname(__FILE__))));
-  }
-
-
-  /*! \brief  Refresh the list of keys for the currently selected server 
-              This function is automatically called when a key was added and removed.
-   */
-  private function refresh_list()
-  {
-    $this->list =  DAK::list_keys($this->Servers[$this->selected_Server]['MAC']);
-  } 
-
-
-  /*! \brief  Creates the HTML output representing the keylist 
-              for this currently selected server 
-      @return String HTML list containig all keys for the selected server.
-   */
-  private function CreateList()
-  {
-    $divlist = new divlist("DAK_keyring");
-    $divlist->SetWidth("100%");
-    $divlist->SetHeight("450px");
-    $divlist->SetEntriesPerPage(0);
-
-    /* Set default col styles 
-     */
-    $s0 = "style='width:10px;'";
-    $s1 = "style='width:100px;'";
-    $s2 = "style='width:100px;'";
-    $s3 = "style='width:100px;'";
-    $s4 = "";
-    $s5 = "style='width:100px; border-right:0px;'";
-
-    /* Add header 
-     */
-    $h0 = array("string" => "",            "attach" => $s0);
-    $h1 = array("string" => _("Key ID"),   "attach" => $s1);
-    $h2 = array("string" => _("Length"),   "attach" => $s2);
-    $h3 = array("string" => _("Validity"), "attach" => $s3);
-    $h4 = array("string" => _("UID"),      "attach" => $s4);
-    $h5 = array("string" => _("Action"),   "attach" => $s5);
-    $divlist->SetHeader(array($h0,$h1,$h2,$h3,$h4,$h5));
-
-    /* Add entries 
-     */
-    foreach($this->list as $key => $entry){
-
-      /* Check if all attributes are given
-       */
-      if(!is_array($entry['UID'])){
-        $entry['UID'] = array($entry['UID']);
-      }
-      $key_id = $length = $valid = "";
-
-      if(isset($entry['ATTRIBUTES']['UID'])){
-        $key_id = $entry['ATTRIBUTES']['UID'];
-      }
-      if(isset($entry['ATTRIBUTES']['LENGTH'])){
-        $length = $entry['ATTRIBUTES']['LENGTH'];
-      }
-      if(isset($entry['ATTRIBUTES']['VALID'])){
-        $valid  = $entry['ATTRIBUTES']['VALID'];
-      }
-
-      /* Create detail icon 
-       */  
-      $hide = "<input type='image' name='details_".$key."' src='images/forward-arrow.png' alt='-' class='center'>&nbsp;";
-      $down = "<input type='image' name='details_".$key."' src='images/down-arrow.png' alt='+' class='center'>&nbsp;";
-
-      $actions = "<input type='image' class='center' alt='".msgPool::delButton()."' 
-                    src='images/lists/trash.png' name='remove_key_".$key."'>";
-
-      /* Add detailed entry 
-          (All UIDs are listed, each in a single column)
-       */
-      if(isset($entry['DETAILS']) && $entry['DETAILS'] == TRUE){
-        $first = TRUE;
-        foreach($entry['UID'] as $val){
-
-          $f0 = array("string" => "","attach" => $s0);
-          $f1 = array("string" => "","attach" => $s1);
-          $f2 = array("string" => "","attach" => $s2);
-          $f3 = array("string" => "","attach" => $s3);
-          $f4 = array("string" => htmlentities($val) ,"attach" => $s4);
-          $f5 = array("string" => "","attach" => $s5);
-
-          if($first){
-            $first = FALSE;
-            $f0 = array("string" => $hide         ,"attach" => $s0);
-            $f1 = array("string" => $key_id       ,"attach" => $s1);
-            $f2 = array("string" => $length       ,"attach" => $s2);
-            $f3 = array("string" => $valid        ,"attach" => $s3);
-            $f4 = array("string" => htmlentities($val) ,"attach" => $s4);
-            $f5 = array("string" => $actions      ,"attach" => $s5);
-          }
-          $divlist->AddEntry(array($f0,$f1,$f2,$f3,$f4,$f5));
-        }
-      }else{
-
-        /* Add non detailed entries, just the first uid is displayed.
-         */
-        if(count($entry['UID']) > 1){
-          $f0 = array("string" => $down,         "attach" => $s0);
-        }else{
-          $f0 = array("string" => "",         "attach" => $s0);
-        }
-        $f1 = array("string" => $key_id,       "attach" => $s1);
-        $f2 = array("string" => $length,       "attach" => $s2);
-        $f3 = array("string" => $valid,        "attach" => $s3);
-        $f4 = array("string" => htmlentities($entry['UID'][0]), "attach" => $s4);
-        $f5 = array("string" => $actions,"attach" => $s5);
-        $divlist->AddEntry(array($f0,$f1,$f2,$f3,$f4,$f5));
-
-      }
-    }
-    return($divlist->DrawList());
-  }
-
-
-  /*! \brief  Act on the HTML posts for this plugin 
-   */
-  public function save_object()
-  {
-    plugin::save_object();
-
-    /* Save html posts, like the selected repository server 
-     */
-    foreach($this->attributes as $attr){
-      if(isset($_POST[$attr])){
-        $this->$attr = get_post($attr);
-      }
-      }
-  
-    /* Display details icon was clicked
-     */
-    foreach($_POST as $name => $value){
-      if(preg_match("/^remove_key_/",$name)){
-        $id = preg_replace("/^remove_key_([0-9]*)_.*$/","\\1",$name);
-        $this->remove_key($id);
-        break;
-      }
-
-      if(preg_match("/^details_/",$name)){
-        $id = preg_replace("/^details_([0-9]*)_.*$/","\\1",$name);
-        if(isset($this->list[$id])){
-          if(!isset($this->list[$id]['DETAILS']) || !$this->list[$id]['DETAILS']){
-            $this->list[$id]['DETAILS'] = TRUE;
-          }else{
-            $this->list[$id]['DETAILS'] = FALSE;
-          }
-          break;
-        }
-      }
-    }
-
-    /* Import new keys 
-     */
-    if(isset($_POST['import_key']) && isset($_FILES['import'])){
-      if($_FILES['import']['size'] != 0){
-        $key = file_get_contents($_FILES['import']['tmp_name']);
-        if($this->import_key($key)){
-          $this->refresh_list();
-        }
-      }
-    }
-  }
-
-   
-  /*! \brief   Removes the given key from the keyring server.
-      @return  Boolean TRUE in case of success else FALSE.
-   */ 
-  private function remove_key($key)
-  {
-    if($this->list[$key]){
-      $mac = $this->Servers[$this->selected_Server]['MAC'];
-      return(DAK::remove_key($mac,$this->list[$key]['ATTRIBUTES']['UID']));
-    }
-  }
-  
-
-  /*! \brief  Imports a new key into the keyring for the currently selected server 
-      @return  Boolean TRUE in case of success else FALSE.
-   */
-  private function import_key($key)
-  {
-    $mac = $this->Servers[$this->selected_Server]['MAC'];
-    return(DAK::import_key($mac,$key));
-  }
-
-
-  /*! \brief  ACL plugin information  
-   */
-  static function plInfo()
-  {
-    return (array(
-          "plShortName"   => _("DAK keyring")."&nbsp;("._("Addon").")",
-          "plDescription" => _("DAK keyring management")."&nbsp;("._("Addon").")",
-          "plSelfModify"  => FALSE,
-          "plDepends"     => array(),
-          "plPriority"    => 98,
-          "plSection"       => array("addon"),
-          "plCategory"      => array("server"),
-          "plProvidedAcls"  => 
-              array(
-                   ) 
-          ));
-  }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/dak/addons/dak/class_dak_queue.inc b/gosa-plugins/dak/addons/dak/class_dak_queue.inc
deleted file mode 100644 (file)
index 3b23e0b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/*
- * This code is part of GOsa (http://www.gosa-project.org)
- * Copyright (C) 2003-2008 GONICUS GmbH
- *
- * ID: $$Id: class_gotomasses.inc 10967 2008-05-20 13:18:12Z hickert $$
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-class dak_queue extends plugin
-{
-  var $attributes = array("selected_Repository");
-  var $selected_Repository = "";  
-  public function __construct($config)
-  {
-    plugin::plugin($config,NULL);
-  }
-
-  public function execute()
-  {
-    $smarty= get_smarty();
-    $smarty->assign("Repositories"          , DAK::get_repositories($this->config));
-    $smarty->assign("selected_Repository" , $this->selected_Repository);
-    return($smarty->fetch (get_template_path('dak_queue.tpl', TRUE, dirname(__FILE__))));
-  }
-
-  public function save_object()
-  {
-    plugin::save_object();
-
-    foreach($this->attributes as $attr){
-      if(isset($_POST[$attr])){
-        $this->$attr = get_post($attr);
-      }
-    }
-  }
-
-  /*! \brief  ACL plugin information
-   */
-  static function plInfo()
-  {
-    return (array(
-          "plShortName"   => _("DAK queue")."&nbsp;("._("Addon").")",
-          "plDescription" => _("DAK queue management")."&nbsp;("._("Addon").")",
-          "plSelfModify"  => FALSE,
-          "plDepends"     => array(),
-          "plPriority"    => 98,
-          "plSection"       => array("addon"),
-          "plCategory"      => array("server"),
-          "plProvidedAcls"  =>
-              array(
-                   )
-          ));
-  }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/dak/addons/dak/class_dak_repository.inc b/gosa-plugins/dak/addons/dak/class_dak_repository.inc
deleted file mode 100644 (file)
index cad356b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/*
- * This code is part of GOsa (http://www.gosa-project.org)
- * Copyright (C) 2003-2008 GONICUS GmbH
- *
- * ID: $$Id: class_gotomasses.inc 10967 2008-05-20 13:18:12Z hickert $$
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-class dak_repository extends plugin
-{
-  public function __construct()
-  {
-
-  }
-
-  public function execute()
-  {
-    $smarty= get_smarty();
-    return($smarty->fetch (get_template_path('dak_repository.tpl', TRUE, dirname(__FILE__))));
-  }
-
-
-
-  /*! \brief  ACL plugin information  
-   */
-  static function plInfo()
-  {
-    return (array(
-          "plShortName"   => _("DAK repository")."&nbsp;("._("Addon").")",
-          "plDescription" => _("DAK repository  management")."&nbsp;("._("Addon").")",
-          "plSelfModify"  => FALSE,
-          "plDepends"     => array(),
-          "plPriority"    => 98,
-          "plSection"       => array("addon"),
-          "plCategory"      => array("server"),
-          "plProvidedAcls"  => 
-              array(
-                   ) 
-          ));
-  }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/dak/addons/dak/class_dakkeyring.inc b/gosa-plugins/dak/addons/dak/class_dakkeyring.inc
new file mode 100644 (file)
index 0000000..89956be
--- /dev/null
@@ -0,0 +1,273 @@
+<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id: class_gotomasses.inc 10967 2008-05-20 13:18:12Z hickert $$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+/*! \brief  The DAK keyring class used to manage DAK keyrings.
+            It provides remove/add key mehtods and lists all keys for a selected server.
+ */
+class dak_keyring extends plugin
+{
+  private $Servers          = array();
+  private $selected_Server  = array();
+  private $list             = array();
+  public $attributes        = array("selected_Server");
+
+
+  /*! \brief   Creates a dak_keyring class.
+      @param   The GOsa configuration object. 
+   */
+  public function __construct($config)
+  {
+    plugin::plugin($config,NULL);
+
+    /* Collect release servers and store them
+     */
+    $this->Servers = DAK::get_repositories_by_server($this->config);
+    if(count($this->Servers)){
+      $this->selected_Server  = key($this->Servers);
+    }
+  }
+
+
+  /*! \brief  Create HTML output for this plugin.
+      @return String  HTML output.
+   */
+  public function execute()
+  {
+    if(isset($_POST['search'])){
+      $this->refresh_list();
+    }
+
+    $smarty= get_smarty();
+    $smarty->assign("Servers"         , $this->Servers);
+    $smarty->assign("selected_Server" , $this->selected_Server);
+    $smarty->assign("list",$this->CreateList());
+    return($smarty->fetch (get_template_path('dak_keyring.tpl', TRUE, dirname(__FILE__))));
+  }
+
+
+  /*! \brief  Refresh the list of keys for the currently selected server 
+              This function is automatically called when a key was added and removed.
+   */
+  private function refresh_list()
+  {
+    $this->list =  DAK::list_keys($this->Servers[$this->selected_Server]['MAC']);
+  } 
+
+
+  /*! \brief  Creates the HTML output representing the keylist 
+              for this currently selected server 
+      @return String HTML list containig all keys for the selected server.
+   */
+  private function CreateList()
+  {
+    $divlist = new divlist("DAK_keyring");
+    $divlist->SetWidth("100%");
+    $divlist->SetHeight("450px");
+    $divlist->SetEntriesPerPage(0);
+
+    /* Set default col styles 
+     */
+    $s0 = "style='width:10px;'";
+    $s1 = "style='width:100px;'";
+    $s2 = "style='width:100px;'";
+    $s3 = "style='width:100px;'";
+    $s4 = "";
+    $s5 = "style='width:100px; border-right:0px;'";
+
+    /* Add header 
+     */
+    $h0 = array("string" => "",            "attach" => $s0);
+    $h1 = array("string" => _("Key ID"),   "attach" => $s1);
+    $h2 = array("string" => _("Length"),   "attach" => $s2);
+    $h3 = array("string" => _("Validity"), "attach" => $s3);
+    $h4 = array("string" => _("UID"),      "attach" => $s4);
+    $h5 = array("string" => _("Action"),   "attach" => $s5);
+    $divlist->SetHeader(array($h0,$h1,$h2,$h3,$h4,$h5));
+
+    /* Add entries 
+     */
+    foreach($this->list as $key => $entry){
+
+      /* Check if all attributes are given
+       */
+      if(!is_array($entry['UID'])){
+        $entry['UID'] = array($entry['UID']);
+      }
+      $key_id = $length = $valid = "";
+
+      if(isset($entry['ATTRIBUTES']['UID'])){
+        $key_id = $entry['ATTRIBUTES']['UID'];
+      }
+      if(isset($entry['ATTRIBUTES']['LENGTH'])){
+        $length = $entry['ATTRIBUTES']['LENGTH'];
+      }
+      if(isset($entry['ATTRIBUTES']['VALID'])){
+        $valid  = $entry['ATTRIBUTES']['VALID'];
+      }
+
+      /* Create detail icon 
+       */  
+      $hide = "<input type='image' name='details_".$key."' src='images/forward-arrow.png' alt='-' class='center'>&nbsp;";
+      $down = "<input type='image' name='details_".$key."' src='images/down-arrow.png' alt='+' class='center'>&nbsp;";
+
+      $actions = "<input type='image' class='center' alt='".msgPool::delButton()."' 
+                    src='images/lists/trash.png' name='remove_key_".$key."'>";
+
+      /* Add detailed entry 
+          (All UIDs are listed, each in a single column)
+       */
+      if(isset($entry['DETAILS']) && $entry['DETAILS'] == TRUE){
+        $first = TRUE;
+        foreach($entry['UID'] as $val){
+
+          $f0 = array("string" => "","attach" => $s0);
+          $f1 = array("string" => "","attach" => $s1);
+          $f2 = array("string" => "","attach" => $s2);
+          $f3 = array("string" => "","attach" => $s3);
+          $f4 = array("string" => htmlentities($val) ,"attach" => $s4);
+          $f5 = array("string" => "","attach" => $s5);
+
+          if($first){
+            $first = FALSE;
+            $f0 = array("string" => $hide         ,"attach" => $s0);
+            $f1 = array("string" => $key_id       ,"attach" => $s1);
+            $f2 = array("string" => $length       ,"attach" => $s2);
+            $f3 = array("string" => $valid        ,"attach" => $s3);
+            $f4 = array("string" => htmlentities($val) ,"attach" => $s4);
+            $f5 = array("string" => $actions      ,"attach" => $s5);
+          }
+          $divlist->AddEntry(array($f0,$f1,$f2,$f3,$f4,$f5));
+        }
+      }else{
+
+        /* Add non detailed entries, just the first uid is displayed.
+         */
+        if(count($entry['UID']) > 1){
+          $f0 = array("string" => $down,         "attach" => $s0);
+        }else{
+          $f0 = array("string" => "",         "attach" => $s0);
+        }
+        $f1 = array("string" => $key_id,       "attach" => $s1);
+        $f2 = array("string" => $length,       "attach" => $s2);
+        $f3 = array("string" => $valid,        "attach" => $s3);
+        $f4 = array("string" => htmlentities($entry['UID'][0]), "attach" => $s4);
+        $f5 = array("string" => $actions,"attach" => $s5);
+        $divlist->AddEntry(array($f0,$f1,$f2,$f3,$f4,$f5));
+
+      }
+    }
+    return($divlist->DrawList());
+  }
+
+
+  /*! \brief  Act on the HTML posts for this plugin 
+   */
+  public function save_object()
+  {
+    plugin::save_object();
+
+    /* Save html posts, like the selected repository server 
+     */
+    foreach($this->attributes as $attr){
+      if(isset($_POST[$attr])){
+        $this->$attr = get_post($attr);
+      }
+      }
+  
+    /* Display details icon was clicked
+     */
+    foreach($_POST as $name => $value){
+      if(preg_match("/^remove_key_/",$name)){
+        $id = preg_replace("/^remove_key_([0-9]*)_.*$/","\\1",$name);
+        $this->remove_key($id);
+        break;
+      }
+
+      if(preg_match("/^details_/",$name)){
+        $id = preg_replace("/^details_([0-9]*)_.*$/","\\1",$name);
+        if(isset($this->list[$id])){
+          if(!isset($this->list[$id]['DETAILS']) || !$this->list[$id]['DETAILS']){
+            $this->list[$id]['DETAILS'] = TRUE;
+          }else{
+            $this->list[$id]['DETAILS'] = FALSE;
+          }
+          break;
+        }
+      }
+    }
+
+    /* Import new keys 
+     */
+    if(isset($_POST['import_key']) && isset($_FILES['import'])){
+      if($_FILES['import']['size'] != 0){
+        $key = file_get_contents($_FILES['import']['tmp_name']);
+        if($this->import_key($key)){
+          $this->refresh_list();
+        }
+      }
+    }
+  }
+
+   
+  /*! \brief   Removes the given key from the keyring server.
+      @return  Boolean TRUE in case of success else FALSE.
+   */ 
+  private function remove_key($key)
+  {
+    if($this->list[$key]){
+      $mac = $this->Servers[$this->selected_Server]['MAC'];
+      return(DAK::remove_key($mac,$this->list[$key]['ATTRIBUTES']['UID']));
+    }
+  }
+  
+
+  /*! \brief  Imports a new key into the keyring for the currently selected server 
+      @return  Boolean TRUE in case of success else FALSE.
+   */
+  private function import_key($key)
+  {
+    $mac = $this->Servers[$this->selected_Server]['MAC'];
+    return(DAK::import_key($mac,$key));
+  }
+
+
+  /*! \brief  ACL plugin information  
+   */
+  static function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("DAK keyring")."&nbsp;("._("Addon").")",
+          "plDescription" => _("DAK keyring management")."&nbsp;("._("Addon").")",
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 98,
+          "plSection"       => array("addon"),
+          "plCategory"      => array("server"),
+          "plProvidedAcls"  => 
+              array(
+                   ) 
+          ));
+  }
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/dak/addons/dak/class_dakqueue.inc b/gosa-plugins/dak/addons/dak/class_dakqueue.inc
new file mode 100644 (file)
index 0000000..3b23e0b
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id: class_gotomasses.inc 10967 2008-05-20 13:18:12Z hickert $$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+class dak_queue extends plugin
+{
+  var $attributes = array("selected_Repository");
+  var $selected_Repository = "";  
+  public function __construct($config)
+  {
+    plugin::plugin($config,NULL);
+  }
+
+  public function execute()
+  {
+    $smarty= get_smarty();
+    $smarty->assign("Repositories"          , DAK::get_repositories($this->config));
+    $smarty->assign("selected_Repository" , $this->selected_Repository);
+    return($smarty->fetch (get_template_path('dak_queue.tpl', TRUE, dirname(__FILE__))));
+  }
+
+  public function save_object()
+  {
+    plugin::save_object();
+
+    foreach($this->attributes as $attr){
+      if(isset($_POST[$attr])){
+        $this->$attr = get_post($attr);
+      }
+    }
+  }
+
+  /*! \brief  ACL plugin information
+   */
+  static function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("DAK queue")."&nbsp;("._("Addon").")",
+          "plDescription" => _("DAK queue management")."&nbsp;("._("Addon").")",
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 98,
+          "plSection"       => array("addon"),
+          "plCategory"      => array("server"),
+          "plProvidedAcls"  =>
+              array(
+                   )
+          ));
+  }
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/dak/addons/dak/class_dakrepository.inc b/gosa-plugins/dak/addons/dak/class_dakrepository.inc
new file mode 100644 (file)
index 0000000..cad356b
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id: class_gotomasses.inc 10967 2008-05-20 13:18:12Z hickert $$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+class dak_repository extends plugin
+{
+  public function __construct()
+  {
+
+  }
+
+  public function execute()
+  {
+    $smarty= get_smarty();
+    return($smarty->fetch (get_template_path('dak_repository.tpl', TRUE, dirname(__FILE__))));
+  }
+
+
+
+  /*! \brief  ACL plugin information  
+   */
+  static function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("DAK repository")."&nbsp;("._("Addon").")",
+          "plDescription" => _("DAK repository  management")."&nbsp;("._("Addon").")",
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 98,
+          "plSection"       => array("addon"),
+          "plCategory"      => array("server"),
+          "plProvidedAcls"  => 
+              array(
+                   ) 
+          ));
+  }
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>