Missing DN page

This commit is contained in:
Jamie Cameron
2010-09-14 18:06:31 -07:00
parent 63b62237a8
commit 9bb95d97bf
2 changed files with 19 additions and 2 deletions

View File

@@ -420,8 +420,12 @@ sql_eprefix=Missing or invalid base DN (no spaces allowed)
sql_eprefix2=Invalid-looking base DN - should be like <tt>dc=mydomain,dc=com</tt>
sql_title2=Create Missing Tables
sql_tableerr=User and group database settings are valid, but some tables needed by Webmin are missing : $1
sql_tableerr2=Click the <b>Create Tables</b> to have them created automatically, or manually run the SQL below.
sql_tableerr2=Click the <b>Create Tables</b> button below to have them created automatically, or manually run the SQL below.
sql_make=Create Tables
sql_title3=Create Missing DN
sql_dnerr=User and group database settings are valid, but the LDAP DN needed by Webmin is missing : $1
sql_dnerr2=Click the <b>Create DN</b> button below to have it create automatically, or add it to your LDAP server manually.
sql_makedn=Create DN
make_title=Create User and Group Tables
make_err=Failed to create user and group tables

View File

@@ -58,7 +58,7 @@ if ($p) {
# Make sure tables exist
$err = &validate_userdb($str, 0);
if ($err) {
if ($err && ($p eq "mysql" || $p eq "postgresql")) {
# Tables are missing, need to create first
&ui_print_header(undef, $text{'sql_title2'}, "");
@@ -76,6 +76,19 @@ if ($err) {
}
print &ui_table_end();
&ui_print_footer("", $text{'index_return'});
}
elsif ($err && $p eq "ldap") {
# LDAP DN is missing
&ui_print_header(undef, $text{'sql_title3'}, "");
print &text('sql_dnerr', $err),"<p>\n";
print $text{'sql_dnerr2'},"<p>\n";
print &ui_form_start("makedn.cgi");
print &ui_hidden("userdb", $str);
print &ui_hidden("userdb_addto", $in{'addto'});
print &ui_form_end([ [ undef, $text{'sql_makedn'} ] ]);
&ui_print_footer("", $text{'index_return'});
}
else {