|
167 | 167 | unset($output); |
168 | 168 |
|
169 | 169 | if (empty($_SESSION['error_msg'])) { |
170 | | - exec (VESTA_CMD."v-delete-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var); |
171 | | - if ($return_var != 0) { |
172 | | - $error = implode('<br>', $output); |
173 | | - if (empty($error)) $error = __('Error code:',$return_var); |
174 | | - $_SESSION['error_msg'] = $error; |
| 170 | + exec (VESTA_CMD."v-list-dns-domain ".$v_username." ".$v_domain, $output, $return_var); |
| 171 | + unset($output); |
| 172 | + if ($return_var == 0) { |
| 173 | + exec (VESTA_CMD."v-delete-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var); |
| 174 | + if ($return_var != 0) { |
| 175 | + $error = implode('<br>', $output); |
| 176 | + if (empty($error)) $error = __('Error code:',$return_var); |
| 177 | + $_SESSION['error_msg'] = $error; |
| 178 | + } |
| 179 | + $restart_dns = 'yes'; |
175 | 180 | } |
176 | | - $restart_dns = 'yes'; |
| 181 | + unset($output); |
177 | 182 | } |
178 | | - unset($output); |
179 | 183 | } |
180 | 184 | } |
181 | 185 |
|
|
192 | 196 | } |
193 | 197 | unset($output); |
194 | 198 | if (empty($_SESSION['error_msg'])) { |
195 | | - exec (VESTA_CMD."v-add-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var); |
196 | | - if ($return_var != 0) { |
197 | | - $error = implode('<br>', $output); |
198 | | - if (empty($error)) $error = __('Error code:',$return_var); |
199 | | - $_SESSION['error_msg'] = $error; |
| 199 | + exec (VESTA_CMD."v-list-dns-domain ".$v_username." ".$v_domain, $output, $return_var); |
| 200 | + unset($output); |
| 201 | + if ($return_var == 0) { |
| 202 | + exec (VESTA_CMD."v-add-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var); |
| 203 | + if ($return_var != 0) { |
| 204 | + $error = implode('<br>', $output); |
| 205 | + if (empty($error)) $error = __('Error code:',$return_var); |
| 206 | + $_SESSION['error_msg'] = $error; |
| 207 | + } |
| 208 | + $restart_dns = 'yes'; |
200 | 209 | } |
201 | | - $restart_dns = 'yes'; |
202 | 210 | } |
203 | 211 | unset($output); |
204 | 212 | } |
|
0 commit comments