create new domain only if necessary

This commit is contained in:
Roland Gruber 2003-11-06 21:25:01 +00:00
parent 81b6cd6107
commit 5a735e1c5a
1 changed files with 6 additions and 1 deletions

View File

@ -146,7 +146,12 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
if ($_SESSION['config']->is_samba3()) {
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_domainSuffix());
echo "<p>&nbsp;</p>\n";
echo "<a href=\"domain.php?action=new\">" . _("No domains found, please create one.") . "</a>\n";
if (sizeof($doms) == 0) {
echo "<a href=\"domain.php?action=new\">" . _("No domains found, please create one.") . "</a>\n";
}
else {
echo "<a href=\"lists/listusers.php\">" . _("User list") . "</a>\n";
}
echo "</body></html>\n";
}
else {