From: hickert Date: Mon, 14 Apr 2008 09:05:33 +0000 (+0000) Subject: Updated FAI Package Variable saving X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9a29456646bf9c42c771f59eccac3c8c9c5b41b9;p=gosa.git Updated FAI Package Variable saving -Skip saving empty variables of type string. The schema does not allow such entries. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10391 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index 5b9f1dee4..3fb126de0 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -518,11 +518,16 @@ class faiPackage extends plugin $pkgattrs['FAIvariableContent'] = $attr['Value']; $pkgdn = "FAIvariable=".$name.",".$this->dn; - /* Tag object */ - $this->tag_attrs($pkgattrs, $pkgdn, $this->gosaUnitTag); + /* Tag object */ + $this->tag_attrs($pkgattrs, $pkgdn, $this->gosaUnitTag); if(in_array($pkgattrs['FAIvariableType'],array("boolean","multiselect","password","select","string","text"))){ - FAI::prepare_to_save_FAI_object($pkgdn,$pkgattrs); + + if($pkgattrs['FAIvariableType'] == "text" && $pkgattrs['FAIvariableContent'] == ""){ + gosa_log("Skipped saving FAIvariable '$name' empty string can't be saved."); + }else{ + FAI::prepare_to_save_FAI_object($pkgdn,$pkgattrs); + } } } }