projects
/
licom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Many more fixes.. Trying to get all this work now..
[licom.git]
/
licom.cgi
diff --git
a/licom.cgi
b/licom.cgi
index
59eddd6
..
f0dfd12
100755
(executable)
--- a/
licom.cgi
+++ b/
licom.cgi
@@
-9,13
+9,14
@@
use CGI::Carp (qw(fatalsToBrowser));
use URI::Escape;
use Data::Dumper;
use URI::Escape;
use Data::Dumper;
-use LiCoM::Config (qw(get_config));
-use LiCoM::Person;
+use LiCoM::Config (qw(get_config set_config read_config));
+use LiCoM::Connection ();
+use LiCoM::Group ();
+use LiCoM::Person ();
our $Debug = 0;
our $Debug = 0;
-our $Config = {};
-our @MultiFields = (qw(address homephone cellphone officephone fax mail uri
group
));
+our @MultiFields = (qw(address homephone cellphone officephone fax mail uri));
our %FieldNames =
(
our %FieldNames =
(
@@
-49,24
+50,25
@@
our %Actions =
vcard => \&action_vcard
);
vcard => \&action_vcard
);
-
$Config = get
_config ();
+
read
_config ();
# make sure AuthLDAPRemoteUserIsDN is enabled.
die unless ($ENV{'REMOTE_USER'});
# make sure AuthLDAPRemoteUserIsDN is enabled.
die unless ($ENV{'REMOTE_USER'});
-
$Config->{'base_dn'} = $ENV{'REMOTE_USER'}
;
+
set_config ('base_dn', $ENV{'REMOTE_USER'})
;
-die unless (defined ($Config->{'uri'}) and defined ($Config->{'base_dn'})
- and defined ($Config->{'bind_dn'}) and defined ($Config->{'password'}));
+die unless (defined (get_config ('uri'))
+ and defined (get_config ('base_dn'))
+ and defined (get_config ('bind_dn'))
+ and defined (get_config ('password')));
-LiCoM::
Pers
on->connect
+LiCoM::
Connecti
on->connect
(
(
- uri => $Config->{'uri'},
- base_dn => $Config->{'base_dn'},
- bind_dn => $Config->{'bind_dn'},
- password => $Config->{'password'}
+ uri => get_config ('uri'),
+ bind_dn => get_config ('bind_dn'),
+ password => get_config ('password')
) or die;
) or die;
-our ($UserCN, $UserID) = LiCoM::Person->get_user ($
Config->{'base_dn
'});
+our ($UserCN, $UserID) = LiCoM::Person->get_user ($
ENV{'REMOTE_USER
'});
if (!$UserID and $Action ne 'save')
{
if (!$UserID and $Action ne 'save')
{
@@
-95,7
+97,7
@@
elsif (ref ($Actions{$Action}) eq 'ARRAY')
}
}
}
}
-LiCoM::
Pers
on->disconnect ();
+LiCoM::
Connecti
on->disconnect ();
exit (0);
exit (0);
@@
-107,6
+109,8
@@
sub action_browse
$group = shift if (@_);
$group ||= '';
$group = shift if (@_);
$group ||= '';
+ return ('');
+
my @all;
if ($group)
{
my @all;
if ($group)
{