Merge branch 'htmlesc'
authorFlorian Forster <octo@leeloo.(none)>
Sun, 11 Jun 2006 14:26:44 +0000 (16:26 +0200)
committerFlorian Forster <octo@leeloo.(none)>
Sun, 11 Jun 2006 14:26:44 +0000 (16:26 +0200)
lib/LiCoM/Person.pm
licom.cgi

index 887e39e..0773f5b 100644 (file)
@@ -492,7 +492,7 @@ sub set
        }
        if (!defined ($ValidFields{$field}))
        {
-               return (undef);
+               return;
        }
 
        if (defined ($value))
@@ -514,7 +514,10 @@ sub set
                $entry->update ($Ldap);
        }
 
-       $obj->{$field} = [] unless (defined ($obj->{$field}));
+       if (!defined ($obj->{$field}) and $ValidFields{$field})
+       {
+               $obj->{$field} = [];
+       }
        
        if (wantarray () and $ValidFields{$field})
        {
index f96349b..190a9b6 100755 (executable)
--- a/licom.cgi
+++ b/licom.cgi
@@ -24,7 +24,6 @@ use CGI (':cgi');
 use CGI::Carp (qw(fatalsToBrowser));
 use URI::Escape;
 use HTML::Entities (qw(encode_entities));
-use Data::Dumper;
 
 use LiCoM::Config (qw(get_config set_config read_config));
 use LiCoM::Connection ();