Bernd Wurst commited on 2014-02-05 18:24:53
Zeige 1 geänderte Dateien mit 5 Einfügungen und 7 Löschungen.
... | ... |
@@ -337,13 +337,11 @@ function save_vhost($vhost) |
337 | 337 |
} |
338 | 338 |
} |
339 | 339 |
|
340 |
- $cert = 0; |
|
340 |
+ $cert = NULL; |
|
341 | 341 |
$certs = user_certs(); |
342 | 342 |
foreach ($certs as $c) |
343 | 343 |
if ($c['id'] == $vhost['cert']) |
344 | 344 |
$cert = $c['id']; |
345 |
- if ($cert == 0) |
|
346 |
- $cert = NULL; |
|
347 | 345 |
|
348 | 346 |
$ipv4 = NULL; |
349 | 347 |
$ipv4_avail = user_ipaddrs(); |
... | ... |
@@ -357,7 +355,7 @@ function save_vhost($vhost) |
357 | 355 |
$autoipv6 = $vhost['autoipv6']; |
358 | 356 |
} |
359 | 357 |
|
360 |
- $args = array(":hostname" => $hostname, |
|
358 |
+ $args = array(":hostname" => ($hostname ? $hostname : NULL), |
|
361 | 359 |
":domain" => $domain, |
362 | 360 |
":docroot" => $vhost['docroot'], |
363 | 361 |
":php" => $vhost['php'], |
... | ... |
@@ -366,13 +364,13 @@ function save_vhost($vhost) |
366 | 364 |
":hsts" => $hsts, |
367 | 365 |
":suexec_user" => $suexec_user, |
368 | 366 |
":server" => $server, |
369 |
- ":logtype" => $vhost['logtype'], |
|
367 |
+ ":logtype" => ($vhost['logtype'] ? $vhost['logtype'] : NULL), |
|
370 | 368 |
":errorlog" => (int) $vhost['errorlog'], |
371 | 369 |
":cert" => $cert, |
372 | 370 |
":ipv4" => $ipv4, |
373 | 371 |
":autoipv6" => $autoipv6, |
374 |
- ":options" => $vhost['options'], |
|
375 |
- ":stats" => $vhost['stats'], |
|
372 |
+ ":options" => ($vhost['options'] ? $vhost['options'] : NULL), |
|
373 |
+ ":stats" => ($vhost['stats'] ? $vhost['stats'] : NULL), |
|
376 | 374 |
":id" => $id); |
377 | 375 |
if ($id != 0) { |
378 | 376 |
logger(LOG_INFO, 'modules/vhosts/include/vhosts', 'vhosts', 'Updating vhost #'.$id.' ('.$vhost['hostname'].'.'.$vhost['domain'].')'); |
379 | 377 |