mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
Commenting previously added code in /web/add/index.php
This commit is contained in:
parent
4bb8a3f09e
commit
ed9450f117
1 changed files with 5 additions and 3 deletions
|
@ -47,13 +47,15 @@ if (!empty($_POST['ok'])) {
|
|||
// Define domain ip address
|
||||
$v_ip = escapeshellarg($_POST['v_ip']);
|
||||
|
||||
// Using public IP instead of internal IP when creating DNS
|
||||
// Gets public IP from 'v-list-user-ips' command (that reads /vesta/data/ips/ip), precisely from 'NAT' field
|
||||
$v_public_ip = $v_ip;
|
||||
$v_temp_ip = $_POST['v_ip'];
|
||||
$v_clean_ip = $_POST['v_ip']; // clean_ip = IP without quotas
|
||||
exec (VESTA_CMD."v-list-user-ips ".$user." json", $output, $return_var);
|
||||
$ips = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
if (isset($ips[$v_temp_ip]) && isset($ips[$v_temp_ip]['NAT']) && trim($ips[$v_temp_ip]['NAT'])!='') {
|
||||
$v_public_ip = trim($ips[$v_temp_ip]['NAT']);
|
||||
if (isset($ips[$v_clean_ip]) && isset($ips[$v_clean_ip]['NAT']) && trim($ips[$v_clean_ip]['NAT'])!='') {
|
||||
$v_public_ip = trim($ips[$v_clean_ip]['NAT']);
|
||||
$v_public_ip = escapeshellarg($v_public_ip);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue