From: janw Date: Tue, 19 Feb 2008 13:54:43 +0000 (+0000) Subject: Only write non-empty entries... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9d85688cf3be4d655cfce7b6944d693bea42384e;p=gosa.git Only write non-empty entries... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8957 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/modules/SIPackages.pm b/gosa-si/modules/SIPackages.pm index 83df82a61..a5e2d06b5 100644 --- a/gosa-si/modules/SIPackages.pm +++ b/gosa-si/modules/SIPackages.pm @@ -937,7 +937,8 @@ sub process_detected_hardware { "gotoSndModule", "ghNetNic", "gotoXResolution", "ghSoundAdapter", "ghCpuType", "gotoXkbModel", "ghGfxAdapter", "gotoXMousePort", "ghMemSize", "gotoXMouseType", "ghUsbSupport", "gotoXHsync", "gotoXDriver", "gotoXVsync", "gotoXMonitor", "gotoHardwareChecksum") { - if(defined($msg_hash->{detected_hardware}[0]->{$attribute})) { + if(defined($msg_hash->{detected_hardware}[0]->{$attribute}) && + length($msg_hash->{detected_hardware}[0]->{$attribute}) >0 ) { if(defined($entry->get_value($attribute))) { $entry->delete($attribute); } @@ -947,7 +948,8 @@ sub process_detected_hardware { } foreach my $attribute ( "gotoModules", "ghScsiDev", "ghIdeDev") { - if(defined($msg_hash->{detected_hardware}[0]->{$attribute})) { + if(defined($msg_hash->{detected_hardware}[0]->{$attribute}) && + length($msg_hash->{detected_hardware}[0]->{$attribute}) >0 ) { if(defined($entry->get_value($attribute))) { $entry->delete($attribute); }