summaryrefslogtreecommitdiffstats
path: root/config-db/OpenSLX/MetaDB/DBI.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-05-25 01:00:56 +0200
committerOliver Tappe2008-05-25 01:00:56 +0200
commit1675af94a20b4e137e1cfcc74898071fd5c1be8d (patch)
tree4ddb481bb32f5f20d8a83f17d40ea3b57b66fb46 /config-db/OpenSLX/MetaDB/DBI.pm
parent* fixed problem in module loading code that under some circumstances led to m... (diff)
downloadcore-1675af94a20b4e137e1cfcc74898071fd5c1be8d.tar.gz
core-1675af94a20b4e137e1cfcc74898071fd5c1be8d.tar.xz
core-1675af94a20b4e137e1cfcc74898071fd5c1be8d.zip
* fixed bug that would not allow setting an empty attribute to '0'
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1801 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/OpenSLX/MetaDB/DBI.pm')
-rw-r--r--config-db/OpenSLX/MetaDB/DBI.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/config-db/OpenSLX/MetaDB/DBI.pm b/config-db/OpenSLX/MetaDB/DBI.pm
index 271463b5..4961cdcc 100644
--- a/config-db/OpenSLX/MetaDB/DBI.pm
+++ b/config-db/OpenSLX/MetaDB/DBI.pm
@@ -895,7 +895,9 @@ sub setSystemAttrs
my @attrsToBeUpdated
= grep {
$valueIsOK->($newAttrs->{$_}) && exists $oldAttrs{$_}
- && ($oldAttrs{$_}->{value} || '') ne ($newAttrs->{$_} || '')
+ && ((defined($oldAttrs{$_}->{value}) xor defined($newAttrs->{$_}))
+ || (defined($oldAttrs{$_}->{value}) && defined($newAttrs->{$_})
+ && $oldAttrs{$_}->{value} ne $newAttrs->{$_}))
} keys %$newAttrs;
# ... insert the new ones ...