Code

Only write non-empty entries...
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Feb 2008 13:54:43 +0000 (13:54 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Feb 2008 13:54:43 +0000 (13:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8957 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/modules/SIPackages.pm

index 83df82a61ff60d1547de70e9e56cc02d0676ddec..a5e2d06b565d7050370c6c8755e9a8522459e7f3 100644 (file)
@@ -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);
                                }