summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73a3a53)
raw | patch | inline | side by side (parent: 73a3a53)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 16 Jun 2008 09:49:53 +0000 (09:49 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 16 Jun 2008 09:49:53 +0000 (09:49 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11338 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/dak/addons/dak/class_dak_keyring.inc | patch | blob | history |
diff --git a/gosa-plugins/dak/addons/dak/class_dak_keyring.inc b/gosa-plugins/dak/addons/dak/class_dak_keyring.inc
index 5b7c79f2dba8bc59952f8be066c31df5d6d4b814..bf20006a729a8f55587ef1d328ef71b89f79bde7 100644 (file)
public function execute()
{
if(isset($_POST['search'])){
- $this->list = DAK::get_queue_entries_for_servers($this->Servers[$this->selected_Server]['MAC']);
+ $this->refresh_list();
}
$smarty= get_smarty();
}
+ private function refresh_list()
+ {
+ $this->list = DAK::get_queue_entries_for_servers($this->Servers[$this->selected_Server]['MAC']);
+ }
+
private function CreateList()
{
/* Get ring entries for the currently selected repository
if(!is_array($entry['UID'])){
$entry['UID'] = array($entry['UID']);
}
- $key_id = $entry['ATTRIBUTES']['UID'];
- $length = $entry['ATTRIBUTES']['LENGTH'];
- $valid = $entry['ATTRIBUTES']['VALID'];
+ $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'];
+ }
$hide = "<input type='image' name='details_".$key."' src='images/forward-arrow.png' alt='+' class='center'> ";
$down = "<input type='image' name='details_".$key."' src='images/down-arrow.png' alt='+' class='center'> ";
$this->$attr = get_post($attr);
}
}
-
+
/* Display details icon was clicked
*/
foreach($_POST as $name => $value){
}
}
}
+
+ /* 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();
+ }
+ }
+ }
+ }
+
+ private function import_key($key)
+ {
+ $mac = $this->Servers[$this->selected_Server]['MAC'];
+ return(DAK::import($mac,$key));
}
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: