#590 vHost eintrag für Standard Domain

This commit is contained in:
Ulrich Block 2015-07-17 21:33:30 +02:00
parent 1e4b765d3e
commit 2e718afef7
3 changed files with 3 additions and 8 deletions

View File

@ -70,7 +70,7 @@ $hdd = ($ui->id('hdd', 10, 'post')) ? $ui->id('hdd', 10, 'post') : 1000;
$ftpPassword = ($ui->password('ftpPassword', 255, 'post')) ? $ui->password('ftpPassword', 255, 'post') : passwordgenerate(10);
$vhostTemplate = $ui->escaped('vhostTemplate', 'post');
$description = $ui->names('description', 255, 'post');
$defaultDomain = $ui->domain('defaultDomain', 255, 'post');
$defaultDomain = $ui->domain('defaultDomain', 'post');
$ownVhost = ($ui->active('ownVhost', 'post')) ? $ui->active('ownVhost', 'post') : 'N';
// CSFR protection with hidden tokens. If token(true) returns false, we likely have an attack
@ -338,11 +338,6 @@ if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
}
}
// Insert/Delete of the domain configuration(s) Unique key is the domain
if (count($domainConfigurations) == 0) {
$domainConfigurations[str_replace('..', '.', $ftpUser . '.' . $defaultDns)] = '';
}
$query = $sql->prepare("INSERT INTO `webVhostDomain` (`webVhostID`,`userID`,`resellerID`,`domain`,`path`,`ownVhost`,`vhostTemplate`) VALUES (?,?,?,?,?,?,?) ON DUPLICATE KEY UPDATE `path`=VALUES(`path`),`ownVhost`=VALUES(`ownVhost`),`vhostTemplate`=VALUES(`vhostTemplate`)");
foreach($domainConfigurations as $domain => $path) {

View File

@ -79,7 +79,7 @@
</div>
<div class="form-group">
<label for="inputDefaultDomain"><?php echo $sprache->dns;?></label>
<label for="inputDefaultDomain"><?php echo $sprache->defaultDns;?></label>
<div class="controls">
<input class="form-control" id="inputDefaultDomain" type="text" name="defaultDomain" value="<?php echo $defaultDomain;?>">
</div>

View File

@ -82,7 +82,7 @@
</div>
<div class="form-group">
<label for="inputDefaultDomain"><?php echo $sprache->dns;?></label>
<label for="inputDefaultDomain"><?php echo $sprache->defaultDns;?></label>
<div class="controls">
<input class="form-control" id="inputDefaultDomain" type="text" name="defaultDomain" value="<?php echo $defaultDomain;?>">
</div>