|
68 | 68 | $v_ssl_home = $data[$v_domain]['SSL_HOME']; |
69 | 69 | $v_backend_template = $data[$v_domain]['BACKEND']; |
70 | 70 | $v_nginx_cache = $data[$v_domain]['FASTCGI_CACHE']; |
71 | | -$v_nginx_cache_length = $data[$v_domain]['FASTCGI_DURATION']; |
72 | | -$v_nginx_cache_check = '' |
73 | | -if(empty($v_nginx_duration)){ |
74 | | - $v_nginx_cache_length = '30m'; |
| 71 | +$v_nginx_cache_duration = $data[$v_domain]['FASTCGI_DURATION']; |
| 72 | +$v_nginx_cache_check = ''; |
| 73 | +if(empty($v_nginx_cache_duration)){ |
| 74 | + $v_nginx_cache_duration = '2m'; |
| 75 | + $v_nginx_cache_check = ''; |
| 76 | +}else{ |
75 | 77 | $v_nginx_cache_check = 'on'; |
76 | 78 | } |
77 | | -; |
78 | 79 | $v_proxy = $data[$v_domain]['PROXY']; |
79 | 80 | $v_proxy_template = $data[$v_domain]['PROXY']; |
80 | 81 | $v_proxy_ext = str_replace(',', ', ', $data[$v_domain]['PROXY_EXT']); |
|
336 | 337 | } |
337 | 338 |
|
338 | 339 | // Enable/Disable nginx cache |
339 | | - if (($_SESSION['WEB_SYSTEM'] == 'nginx') && ($v_nginx_cache_check != $_POST['v_nginx_cache_check'] ) && ($v_nginx_cache_length != $_POST['v_nginx_cache_length'] && $_POST['v_nginx_cache'] = "yes" ) && (empty($_SESSION['error_msg']))) { |
| 340 | + if (($_SESSION['WEB_SYSTEM'] == 'nginx') && ($v_nginx_cache_check != $_POST['v_nginx_cache_check'] ) && ($v_nginx_cache_duration != $_POST['v_nginx_cache_duration'] && $_POST['v_nginx_cache'] = "yes" ) && (empty($_SESSION['error_msg']))) { |
340 | 341 | if ( $_POST['v_nginx_cache_check'] == 'on' ) { |
341 | | - if (!empty ($_POST['v_nginx_cache_length'])){ |
342 | | - echo $_POST['v_nginx_cache_length'] = "2m"; |
| 342 | + if (empty ($_POST['v_nginx_cache_duration'])){ |
| 343 | + echo $_POST['v_nginx_cache_duration'] = "2m"; |
343 | 344 | } |
344 | | - exec (HESTIA_CMD."v-add-fastcgi-cache ".$v_username." ".escapeshellarg($v_domain).' '. escapeshellarg($_POST['v_nginx_duration']) , $output, $return_var); |
| 345 | + exec (HESTIA_CMD."v-add-fastcgi-cache ".$v_username." ".escapeshellarg($v_domain).' '. escapeshellarg($_POST['v_nginx_cache_duration']) , $output, $return_var); |
345 | 346 | check_return_code($return_var,$output); |
346 | 347 | unset($output); |
347 | 348 | } else { |
|
0 commit comments