diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-02-23 16:52:34 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-02-23 16:52:34 +0000 |
commit | 859eb6c2ea7b2f1236067e619659bd2857ad2c00 (patch) | |
tree | 4545398bb7face910142fea6057483bf07db710f /mkpeople | |
parent | 0a0b2dfdb2c70ea255585e506b7ffd92e114a8c5 (diff) | |
download | mgapeople-859eb6c2ea7b2f1236067e619659bd2857ad2c00.tar mgapeople-859eb6c2ea7b2f1236067e619659bd2857ad2c00.tar.gz mgapeople-859eb6c2ea7b2f1236067e619659bd2857ad2c00.tar.bz2 mgapeople-859eb6c2ea7b2f1236067e619659bd2857ad2c00.tar.xz mgapeople-859eb6c2ea7b2f1236067e619659bd2857ad2c00.zip |
Add index page
Diffstat (limited to 'mkpeople')
-rwxr-xr-x | mkpeople | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -98,6 +98,20 @@ sub output_groups { $template->process("groupindex.$extension", $vars, "index.$extension"); } +sub output_index { + my ($extension) = @_; + my $template = Template->new({ + INCLUDE_PATH => $config->{tmpl_dir}, + OUTPUT_PATH => "$config->{output_dir}", + }); + my $vars = { + config => $config, + users => \%users, + groups => \%groups, + }; + $template->process("index.$extension", $vars, "index.$extension"); +} + my $bindpw = read_file($config->{bindpwfile}); chomp $bindpw; my $ldap = Net::LDAP->new($config->{ldapserver}) or die "$@"; @@ -109,3 +123,4 @@ die $m->error if $m->is_error; loadgroups($ldap); output_users('html'); output_groups('html'); +output_index('html'); |