summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c8675f)
raw | patch | inline | side by side (parent: 2c8675f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Aug 2008 11:12:09 +0000 (11:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Aug 2008 11:12:09 +0000 (11:12 +0000) |
-Fixed several index problems.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12258 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12258 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsi/class_opsi.inc | patch | blob | history | |
gosa-plugins/opsi/admin/opsi/class_opsi_generic.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc
index 4c055b6cb7e7c69d4e45c100329ce70548954275..e764de2409dfceb279f37471eaaa8a0f3670a9a2 100644 (file)
$res = $this->send_data("gosa_opsi_get_local_products",$this->target,$data,TRUE);
$items = array();
- if($res['XML']['ITEM']['PRODUCTID']){
+ if(isset($res['XML']['ITEM']['PRODUCTID'])){
if(!is_array($res['XML']['ITEM']['PRODUCTID'])){
$items[$res['XML']['ITEM']['PRODUCTID']]['NAME'] = $res['XML']['ITEM']['PRODUCTID'];
$items[$res['XML']['ITEM']['PRODUCTID']]['DESC'] = $res['XML']['ITEM']['DESCRIPTION'];
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi_generic.inc b/gosa-plugins/opsi/admin/opsi/class_opsi_generic.inc
index 0b23871615c1fd2bd5cbe61cd97fd2f4a4037a01..a36c388469a19ff046f58a5d547a8866f7356698 100644 (file)
<?php
-class opsi_generic extends plugin
+class opsigeneric extends plugin
{
private $opsi;
private $hostId;
$this->initially_was_account = TRUE;
/* Get hostId */
- $this->hostId = preg_replace("/^opsi:=([^,]*),.*$/","\\1",$hostId);
+ if($hostId != "new"){
+ $this->hostId = preg_replace("/^opsi:=([^,]*),.*$/","\\1",$hostId);
+ }
/* Try to plugin */
$this->init();
}
/* Get selected products */
- if(!$err) {
+ if(!$err && !empty($this->hostId)) {
$tmp = array_keys($this->opsi->get_netboot_products($this->hostId));
$this->s_selectedNetbootProduct = $tmp[0];
$err |= $this->opsi->is_error();
}
- if(!$err) {
+ if(!$err && !empty($this->hostId)) {
$tmp = $this->opsi->get_local_products($this->hostId);
$err |= $this->opsi->is_error();
$this->a_selectedLocalProducts = $tmp;
}
/* Load product configuration */
- if(!$err) {
+ if(!$err && !empty($this->hostId)) {
foreach($this->a_selectedLocalProducts as $name => $data){
$CFG = $this->opsi->get_product_properties($name,$this->hostId);
$err |= $this->opsi->is_error();
$this->dialog = NULL;
}
- if(isset($_POST['opsi_generic'])){
+ if(isset($_POST['opsigeneric'])){
if(isset($_POST['opsi_netboot_product'])){
$SNP = trim($_POST['opsi_netboot_product']);