Use Serializer in LDAP config backend

This commit is contained in:
Clément Oudot 2009-11-17 16:17:49 +00:00
parent 7d255abdef
commit 2471c79c1a
1 changed files with 4 additions and 2 deletions

View File

@ -8,8 +8,9 @@ package Lemonldap::NG::Common::Conf::LDAP;
use strict;
use Net::LDAP;
use Lemonldap::NG::Common::Conf::Constants; #inherits
use Lemonldap::NG::Common::Conf::Serializer;
our $VERSION = 0.01;
our $VERSION = 0.02;
BEGIN {
*Lemonldap::NG::Common::Conf::ldap = \&ldap;
@ -122,6 +123,7 @@ sub unlock {
sub store {
my ( $self, $fields ) = @_;
$fields = $self->serialize($fields);
my $confName = "lmConf-" . $fields->{cfgNum};
my $confDN = "cn=$confName," . $self->{ldapConfBase};
@ -172,7 +174,7 @@ sub load {
}
}
$self->ldap->unbind() && delete $self->{ldap};
return $f;
return $self->unserialize($f);
}
sub delete {