- add possibility to add a subdomain of another domain as "full"-domain in admin-interface, fixes #329
This commit is contained in:
@@ -157,7 +157,15 @@ if($page == 'domains'
|
||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||
}
|
||||
|
||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
|
||||
// check for deletion of main-domains which are logically subdomains, #329
|
||||
$rsd_sql = '';
|
||||
$remove_subbutmain_domains = isset($_POST['delete_userfiles']) ? 1 : 0;
|
||||
if($remove_subbutmain_domains == 1)
|
||||
{
|
||||
$rsd_sql .= ' OR `ismainbutsubto` = "'.(int)$id.'"';
|
||||
}
|
||||
|
||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '"'.$rsd_sql.') AND `isemaildomain`="1"';
|
||||
$subResult = $db->query($query);
|
||||
$idString = array();
|
||||
|
||||
@@ -177,7 +185,7 @@ if($page == 'domains'
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables");
|
||||
}
|
||||
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'".$rsd_sql);
|
||||
$deleted_domains = (int)$db->affected_rows();
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'");
|
||||
@@ -191,7 +199,12 @@ if($page == 'domains'
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('admin_domain_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']));
|
||||
$showcheck = false;
|
||||
if(domainHasMainSubDomains($id))
|
||||
{
|
||||
$showcheck = true;
|
||||
}
|
||||
ask_yesno_withcheckbox('admin_domain_reallydelete', 'remove_subbutmain_domains', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']), $showcheck);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,6 +229,7 @@ if($page == 'domains'
|
||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
||||
$speciallogfile = intval($_POST['speciallogfile']);
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
$issubof = intval($_POST['issubof']);
|
||||
$customerid = intval($_POST['customerid']);
|
||||
$customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ");
|
||||
|
||||
@@ -446,6 +460,11 @@ if($page == 'domains'
|
||||
{
|
||||
$caneditdomain = '0';
|
||||
}
|
||||
|
||||
if($issubof <= '0')
|
||||
{
|
||||
$issubof = '0';
|
||||
}
|
||||
|
||||
if($domain == '')
|
||||
{
|
||||
@@ -500,7 +519,8 @@ if($page == 'domains'
|
||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||
'specialsettings' => $specialsettings,
|
||||
'registration_date' => $registration_date
|
||||
'registration_date' => $registration_date,
|
||||
'issubof' => $issubof
|
||||
);
|
||||
|
||||
$security_questions = array(
|
||||
@@ -522,7 +542,7 @@ if($page == 'domains'
|
||||
}
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `ismainbutsubto`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "', '".(int)$issubof."')");
|
||||
$domainid = $db->insert_id();
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
|
||||
@@ -607,12 +627,16 @@ if($page == 'domains'
|
||||
}
|
||||
|
||||
$domains = makeoption($lng['domains']['noaliasdomain'], 0, NULL, true);
|
||||
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain`, `c`.`loginname` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 " . $standardsubdomains . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " AND `d`.`customerid`=`c`.`customerid` ORDER BY `loginname`, `domain` ASC");
|
||||
|
||||
$all_domains = '';
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
||||
$all_domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
||||
}
|
||||
$domains .= $all_domains;
|
||||
$subtodomains .= $all_domains;
|
||||
|
||||
$phpconfigs = '';
|
||||
$configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
||||
@@ -724,6 +748,7 @@ if($page == 'domains'
|
||||
}
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
$issubof = intval($_POST['issubof']);
|
||||
$isemaildomain = intval($_POST['isemaildomain']);
|
||||
$email_only = intval($_POST['email_only']);
|
||||
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
||||
@@ -915,6 +940,11 @@ if($page == 'domains'
|
||||
{
|
||||
standard_error('domainisaliasorothercustomer');
|
||||
}
|
||||
|
||||
if($issubof <= '0')
|
||||
{
|
||||
$issubof = '0';
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'id' => $id,
|
||||
@@ -942,7 +972,8 @@ if($page == 'domains'
|
||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||
'specialsettings' => $specialsettings,
|
||||
'registration_date' => $registration_date
|
||||
'registration_date' => $registration_date,
|
||||
'issubof' => $issubof
|
||||
);
|
||||
|
||||
$security_questions = array(
|
||||
@@ -976,7 +1007,8 @@ if($page == 'domains'
|
||||
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|
||||
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|
||||
|| $specialsettings != $result['specialsettings']
|
||||
|| $aliasdomain != $result['aliasdomain'])
|
||||
|| $aliasdomain != $result['aliasdomain']
|
||||
|| $issubof != $result['ismainbutsubto'])
|
||||
{
|
||||
inserttask('1');
|
||||
}
|
||||
@@ -1038,7 +1070,7 @@ if($page == 'domains'
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
|
||||
}
|
||||
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
||||
$redirect_props = Array(
|
||||
@@ -1093,6 +1125,14 @@ if($page == 'domains'
|
||||
{
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
|
||||
}
|
||||
|
||||
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$result['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['ismainbutsubto']);
|
||||
}
|
||||
|
||||
if($userinfo['ip'] == "-1")
|
||||
{
|
||||
|
||||
@@ -301,6 +301,7 @@ CREATE TABLE `panel_domains` (
|
||||
`phpsettingid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1',
|
||||
`mod_fcgid_starter` int(4) default '-1',
|
||||
`mod_fcgid_maxrequests` int(4) default '-1',
|
||||
`ismainbutsubto` int(11) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `customerid` (`customerid`),
|
||||
KEY `parentdomain` (`parentdomainid`),
|
||||
@@ -454,7 +455,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.12-svn2');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.12-svn3');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||
|
||||
@@ -973,3 +973,14 @@ if(isFroxlorVersion('0.9.12-svn1'))
|
||||
|
||||
updateToVersion('0.9.12-svn2');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.12-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.12-svn2 to 0.9.12-svn3", false);
|
||||
|
||||
showUpdateStep("Adding new field to domain table");
|
||||
$db->query("ALTER TABLE `".TABLE_PANEL_DOMAINS."` ADD `ismainbutsubto` int(11) unsigned NOT NULL default '0' AFTER `mod_fcgid_maxrequests`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.12-svn3');
|
||||
}
|
||||
|
||||
60
lib/functions/froxlor/function.domainHasMainSubDomains.php
Normal file
60
lib/functions/froxlor/function.domainHasMainSubDomains.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* check whether a domain has subdomains added as full-domains
|
||||
* #329
|
||||
*
|
||||
* @param int $id domain-id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function domainHasMainSubDomains($id = 0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT COUNT(`id`) as `mainsubs` FROM `".TABLE_PANEL_DOMAINS."` WHERE `ismainbutsubto` = '".(int)$id."'";
|
||||
$result = $db->query_first($sql);
|
||||
if(isset($result['mainsubs'])
|
||||
&& $result['mainsubs'] > 0
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* check whether a subof-domain exists
|
||||
* #329
|
||||
*
|
||||
* @param int $id subof-domain-id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function domainMainToSubExists($id = 0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT `id` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$id."'";
|
||||
$result = $db->query_first($sql);
|
||||
if(isset($result['id'])
|
||||
&& $result['id'] > 0
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.12-svn2';
|
||||
$version = '0.9.12-svn3';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
|
||||
@@ -1468,4 +1468,10 @@ $lng['panel']['descriptionerrordocument'] = 'Can be an URL, path to a file or ju
|
||||
$lng['error']['stringerrordocumentnotvalidforlighty'] = 'A string as ErrorDocument does not work in lighttpd, please specify a path to a file';
|
||||
$lng['error']['urlerrordocumentnotvalidforlighty'] = 'An URL as ErrorDocument does not work in lighttpd, please specify a path to a file';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.12-svn3
|
||||
$lng['question']['remove_subbutmain_domains'] = 'Also remove domains which are added as full domains but which are subdomains of this domain?';
|
||||
$lng['domains']['issubof'] = 'This domain is a subdomain of another domain';
|
||||
$lng['domains']['issubofinfo'] = 'You have to set this to the correct domain if you want to add a subdomain as full-domain (e.g. you want to add "www.domain.tld", you have to select "domain.tld" here)';
|
||||
$lng['domains']['nosubtomaindomain'] = 'No subdomain of a full domain';
|
||||
|
||||
?>
|
||||
|
||||
@@ -1451,4 +1451,10 @@ $lng['panel']['descriptionerrordocument'] = 'Mögliche Werte sind: URL, Pfad
|
||||
$lng['error']['stringerrordocumentnotvalidforlighty'] = 'Ein Text als Fehlerdokument funktioniert leider in LigHTTPd nicht, bitte geben Sie einen Pfad zu einer Datei an';
|
||||
$lng['error']['urlerrordocumentnotvalidforlighty'] = 'Eine URL als Fehlerdokument funktioniert leider in LigHTTPd nicht, bitte geben Sie einen Pfad zu einer Datei an';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.12-svn3
|
||||
$lng['question']['remove_subbutmain_domains'] = 'Auch Domains entfernen, welche als volle Domains hinzugefügt wurden, aber Subdomains von dieser Domain sind?';
|
||||
$lng['domains']['issubof'] = 'Diese Domain ist eine Subdomain von der Domain';
|
||||
$lng['domains']['issubofinfo'] = 'Diese Einstellung muss gesetzt werden, wenn Sie eine Subdomain einer Hauptdomain als Hauptdomain anlegen (z.B. soll "www.domain.tld" hinzugefügt werden, somit muss hier "domain.tld" ausgewählt werden)';
|
||||
$lng['domains']['nosubtomaindomain'] = 'Keine Subdomain einer Hauptdomain';
|
||||
|
||||
?>
|
||||
|
||||
@@ -600,8 +600,15 @@ class apache
|
||||
|
||||
protected function getVhostFilename($domain, $ssl_vhost = false)
|
||||
{
|
||||
if((int)$domain['parentdomainid'] == 0)
|
||||
{
|
||||
if((int)$domain['parentdomainid'] == 0
|
||||
&& ((int)$domain['ismainbutsubto'] == 0
|
||||
|| domainMainToSubExists($domain['ismainbutsubto']) == false)
|
||||
) {
|
||||
$vhost_no = '22';
|
||||
}
|
||||
elseif((int)$domain['parentdomainid'] == 0
|
||||
&& (int)$domain['ismainbutsubto'] > 0
|
||||
) {
|
||||
$vhost_no = '21';
|
||||
}
|
||||
else
|
||||
|
||||
@@ -278,8 +278,19 @@ class lighttpd
|
||||
$_pos = strrpos($_tmp_path, '/');
|
||||
$_inc_path = substr($_tmp_path, $_pos+1);
|
||||
|
||||
if((int)$domain['parentdomainid'] == 0)
|
||||
{
|
||||
if((int)$domain['parentdomainid'] == 0
|
||||
&& ((int)$domain['ismainbutsubto'] == 0
|
||||
|| domainMainToSubExists($domain['ismainbutsubto']) == false)
|
||||
) {
|
||||
$vhost_no = '52';
|
||||
if($ssl == '1')
|
||||
{
|
||||
$vhost_no = '62';
|
||||
}
|
||||
}
|
||||
elseif((int)$domain['parentdomainid'] == 0
|
||||
&& (int)$domain['ismainbutsubto'] > 0
|
||||
) {
|
||||
$vhost_no = '51';
|
||||
if($ssl == '1')
|
||||
{
|
||||
|
||||
@@ -34,6 +34,10 @@ $header
|
||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="alias">$domains</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['issubof']}:<br /><small>{$lng['domains']['issubofinfo']}</small></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="issubof">$subtodomains</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['admin']['domain_edit']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$caneditdomain</td>
|
||||
|
||||
@@ -37,6 +37,10 @@ $header
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="alias">$domains</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['issubof']}:<br /><small>{$lng['domains']['issubofinfo']}</small></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="issubof">$subtodomains</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['associated_with_domain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$subdomains} {$lng['customer']['subdomains']}, {$alias_check} {$lng['domains']['aliasdomains']}, {$emails} {$lng['customer']['emails']}, {$email_accounts} {$lng['customer']['accounts']}, {$email_forwarders} {$lng['customer']['forwarders']}</td>
|
||||
|
||||
Reference in New Issue
Block a user