From 2e57a7d346764109f49f2f6ad5e28c42c4597e76 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 17 Mar 2008 22:25:57 +0000 Subject: * removed debug output * fixed problem with respect to writing system attributes: do not filter unset attributes for the default-system, as we want that to show all existing attributes git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1649 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/OpenSLX/MetaDB/DBI.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config-db/OpenSLX/MetaDB/DBI.pm b/config-db/OpenSLX/MetaDB/DBI.pm index 50c1465d..1d706d8c 100644 --- a/config-db/OpenSLX/MetaDB/DBI.pm +++ b/config-db/OpenSLX/MetaDB/DBI.pm @@ -750,7 +750,6 @@ sub addInstalledPlugin = defined $pluginAttrs->{$pluginAttrName} ? $pluginAttrs->{$pluginAttrName} : '-'; -print "$pluginAttrName: $currVal <=> $givenVal\n"; next if $currVal eq $givenVal; return if ! $self->_doUpdate( 'installed_plugin_attr', [ $attrInfo->{id} ], [ { @@ -883,7 +882,13 @@ sub setSystemAttrs value => $attrs->{$_}, } } - grep { defined $attrs->{$_} } + grep { + # Write undefined attributes for the default system, such that + # it shows all existing attributes. All other systems never + # write undefined attributes (if they have not defined a + # specific attribute, it is inherited from "above"). + $systemID == 0 || defined $attrs->{$_} + } keys %$attrs; $self->_doInsert('system_attr', \@attrData); return 1; -- cgit v1.2.3-55-g7522