---- Changes since 1.440 ----
The protocols served by the LDAP server, such as SSL and non-encrypted, can now be set on the OpenLDAP Server Configuration page. This is only possible on Redhat and Debian-derived systems though, as the protocols are configured in the init script.
Fixed a bug that prevented browsing of the LDAP database in SSL mode, thanks to Paul R. Ganci.
+---- Changes since 1.480 ----
+Updated the module to support the new OpenLDAP LDIF-format configuration files, as seen on Ubuntu 8.10.
&ReadParse();
# Get included schemas
-$conf = &get_config();
-foreach $i (&find_value("include", $conf)) {
- if ($i =~ /^(.*)\// && $1 eq $config{'schema_dir'}) {
- $incs{$i} = ++$n;
+if (&get_config_type() == 1) {
+ $conf = &get_config();
+ foreach $i (&find_value("include", $conf)) {
+ if ($i =~ /^(.*)\// && $1 eq $config{'schema_dir'}) {
+ $incs{$i} = ++$n;
+ }
}
+ $editable = 1;
}
# Show a table of all known schema files, with checkboxes
print $text{'schema_pagedesc'},"<p>\n";
-@tds = ( "width=5", "width=20%", "width=65%", "width=10%", "width=5% nowrap" );
+@tds = ( $editable ? ( "width=5" ) : ( ),
+ "width=20%", "width=65%", "width=10%", "width=5% nowrap" );
print &ui_form_start("save_schema.cgi", "post");
-print &ui_columns_start([ "",
+print &ui_columns_start([ $editable ? ( "" ) : ( ),
$text{'schema_file'},
$text{'schema_desc'},
$text{'schema_act'},
- $text{'schema_move'} ], 100, 0, \@tds);
+ $editable ? ( $text{'schema_move'} ) : ( ) ],
+ 100, 0, \@tds);
@files = sort { &schema_sorter } &list_schema_files();
for($i=0; $i<@files; $i++) {
$s = $files[$i];
else {
$mover = "";
}
- print &ui_checked_columns_row(
- [ $s->{'name'},
- $s->{'desc'} || $s->{'file'},
- &ui_links_row(\@acts),
- $mover,
- ],
- \@tds, "d", $s->{'file'}, $incs{$s->{'file'}},
- $s->{'name'} eq 'core');
+ if ($editable) {
+ # With move / enable checkbox
+ print &ui_checked_columns_row(
+ [ $s->{'name'},
+ $s->{'desc'} || $s->{'file'},
+ &ui_links_row(\@acts),
+ $mover,
+ ],
+ \@tds, "d", $s->{'file'}, $incs{$s->{'file'}},
+ $s->{'name'} eq 'core');
+ }
+ else {
+ # View files only
+ print &ui_columns_row(
+ [ $s->{'name'},
+ $s->{'desc'} || $s->{'file'},
+ &ui_links_row(\@acts) ], \@tds);
+ }
}
print &ui_columns_end();
-print &ui_form_end([ [ undef, $text{'save'} ] ]);
+print &ui_form_end($editable ? [ [ undef, $text{'save'} ] ] : [ ]);
&ui_print_footer("", $text{'index_return'});
print &ui_form_start("save_sfile.cgi", "form-data");
print &ui_hidden("file", $in{'file'});
-print &ui_table_start($text{'schema_eheader'}, undef, 2, [ "width=30%" ]);
+print &ui_table_start($text{'schema_eheader'}, "width=100%", 2);
# Filename
print &ui_table_row($text{'schema_path'},
# Contents
print &ui_table_row(undef,
- &ui_textarea("data", &read_file_contents($in{'file'}), 20, 80), 2);
+ &ui_textarea("data", &read_file_contents($in{'file'}), 20, 80,
+ undef, 0, "style='width:100%'"), 2);
print &ui_table_end();
print &ui_form_end([ [ undef, $text{'save'} ] ]);