@@ -69,9 +69,12 @@ discard block |
||
| 69 | 69 | $this->domainName = $data['domain']; |
| 70 | 70 | |
| 71 | 71 | // Determine owner |
| 72 | - if ($data['username'] === $context->getUsername()) { |
|
| 72 | + if ($data['username'] === $context->getUsername()) |
|
| 73 | + { |
|
| 73 | 74 | $this->owner = $context->getContextUser(); |
| 74 | - } else { |
|
| 75 | + } |
|
| 76 | + else |
|
| 77 | + { |
|
| 75 | 78 | throw new DirectAdminException('Could not determine relationship between context user and domain'); |
| 76 | 79 | } |
| 77 | 80 | |
@@ -152,10 +155,13 @@ discard block |
||
| 152 | 155 | 'from' => $domain, |
| 153 | 156 | 'action' => 'add', |
| 154 | 157 | ]; |
| 155 | - if ($alias) { |
|
| 158 | + if ($alias) |
|
| 159 | + { |
|
| 156 | 160 | $parameters['alias'] = 'yes'; |
| 157 | 161 | $list = &$this->aliases; |
| 158 | - } else { |
|
| 162 | + } |
|
| 163 | + else |
|
| 164 | + { |
|
| 159 | 165 | $list = &$this->pointers; |
| 160 | 166 | } |
| 161 | 167 | $this->getContext()->invokePost('DOMAIN_POINTER', $parameters); |
@@ -320,7 +326,8 @@ discard block |
||
| 320 | 326 | 'action' => $action, |
| 321 | 327 | 'domain' => $this->domainName, |
| 322 | 328 | ], $parameters)); |
| 323 | - if ($clearCache) { |
|
| 329 | + if ($clearCache) |
|
| 330 | + { |
|
| 324 | 331 | $this->clearCache(); |
| 325 | 332 | } |
| 326 | 333 | return $response; |