/[webwml]/db.debian.org/Util.pm
ViewVC logotype

Diff of /db.debian.org/Util.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by tausq, Sun Apr 30 15:17:41 2000 UTC revision 1.11 by tausq, Sat May 6 06:10:05 2000 UTC
# Line 301  sub ReadConfigFile { Line 301  sub ReadConfigFile {
301    return %config;    return %config;
302  }  }
303    
304    sub LDAPUpdate {
305      my $ldap = shift;
306      my $dn = shift;
307      my $attr = shift;
308      my $val = shift;
309      my $mesg;
310    
311      if (!$val) {
312        $mesg = $ldap->modify($dn, delete => { $attr => [] });
313      } else {
314        $val = [ $val ] if (!ref($val));
315        $mesg = $ldap->modify($dn, replace => { $attr => $val });
316        $mesg->code && &Util::HTMLError("error updating $attr: ".$mesg->error);
317      }
318    }
319    
320  1;  1;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.5