From: hickert Date: Fri, 5 Sep 2008 08:38:26 +0000 (+0000) Subject: Updated opsi X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=780d7d589045f84c3e2cc7fa5206ce54c652f791;p=gosa.git Updated opsi -Updated opsi hard && software tabs. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12367 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/opsi/admin/opsi/class_opsiware.inc b/gosa-plugins/opsi/admin/opsi/class_opsiware.inc index 5e0caedd8..75909c441 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsiware.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsiware.inc @@ -1,13 +1,23 @@ HW_info = $this->opsi->get_client_hardware($this->hostId); - $err |= $this->opsi->is_error(); - } - if(!$err){ - $this->SW_info = $this->opsi->get_client_software($this->hostId); - $err |= $this->opsi->is_error(); + if($this->type == 0){ + $this->info = $this->opsi->get_client_hardware($this->hostId); + $err = $this->opsi->is_error(); + }else{ + $this->info = $this->opsi->get_client_software($this->hostId); + $err = $this->opsi->is_error(); } $this->init_failed = $err; } + public function execute() { if(isset($_POST['reinit']) && $this->init_failed){ $this->init(); } - if(isset($_GET['type'])) $this->type = $_GET['type']; - $smarty = get_smarty(); $smarty->assign("init_failed",$this->init_failed); if($this->init_failed){ @@ -45,14 +52,8 @@ class opsiWare extends plugin $smarty->assign("message",$this->opsi->get_error()); return($smarty->fetch(get_template_path("opsiware.tpl",TRUE,dirname(__FILE__)))); } - $smarty->assign("type", $this->type); - - if($this->type == 1){ - $smarty->assign("info", $this->HW_info); - }else{ - $smarty->assign("info", $this->SW_info); - } + $smarty->assign("info", $this->info); return($smarty->fetch(get_template_path("opsiware.tpl",TRUE,dirname(__FILE__)))); } } diff --git a/gosa-plugins/opsi/admin/opsi/opsiware.tpl b/gosa-plugins/opsi/admin/opsi/opsiware.tpl index cdb809a68..9e57fd1eb 100644 --- a/gosa-plugins/opsi/admin/opsi/opsiware.tpl +++ b/gosa-plugins/opsi/admin/opsi/opsiware.tpl @@ -3,12 +3,10 @@ {msgPool type=siError p=$message} {else} - {if $type == 1} + {if $type == 0}

 {t}Hardware information{/t}

- Software info {else}

 {t}Software information{/t}

- Hardware info {/if} {foreach from=$info item=item key=key}