Skip to content

Commit a1f522a

Browse files
committed
Fix issue when Filemanager is "no" and saving "edit server"
Fixes https://forum.hestiacp.com/t/how-to-install-own-boght-wildcard-certificates/1629/6 Changed in template the default values to true/false (As in hestia.conf) Adjusted some if else statements to ensure correct behavoiur
1 parent 5298776 commit a1f522a

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

web/edit/server/index.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,18 +257,16 @@
257257
// Set File Manager support
258258
if (empty($_SESSION['error_msg'])) {
259259
if ((!empty($_POST['v_filemanager'])) && ($_SESSION['FILE_MANAGER'] != $_POST['v_filemanager'])) {
260-
if ($_POST['v_filemanager'] == 'yes') {
261-
$_POST['v_filemanager'] == 'true';
260+
if ($_POST['v_filemanager'] == 'true') {
262261
exec (HESTIA_CMD."v-add-sys-filemanager", $output, $return_var);
263262
check_return_code($return_var,$output);
264263
unset($output);
265-
if (empty($_SESSION['error_msg'])) $_SESSION['FILE_MANAGER'] = 'yes';
264+
if (empty($_SESSION['error_msg'])) $_SESSION['FILE_MANAGER'] = 'true';
266265
} else {
267-
$_POST['v_filemanager'] == 'false';
268266
exec (HESTIA_CMD."v-delete-sys-filemanager", $output, $return_var);
269267
check_return_code($return_var,$output);
270268
unset($output);
271-
if (empty($_SESSION['error_msg'])) $_SESSION['FILE_MANAGER'] = 'no';
269+
if (empty($_SESSION['error_msg'])) $_SESSION['FILE_MANAGER'] = 'false';
272270
}
273271
}
274272
}

web/templates/admin/edit_server.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,14 @@
842842
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="hestia">
843843
<tr>
844844
<td class="vst-text input-label">
845-
<?php print __('Fm');?>
845+
<?php print __('Filemanager');?>
846846
</td>
847847
</tr>
848848
<tr>
849849
<td>
850850
<select class="vst-list" name="v_filemanager">
851-
<option value='no'><?php print __('no'); ?></option>
852-
<option value='yes' <?php if($_SESSION['FILE_MANAGER'] == 'true') echo 'selected' ?> ><?php print __('yes'); ?></option>
851+
<option value='false'><?php print __('no'); ?></option>
852+
<option value='true' <?php if($_SESSION['FILE_MANAGER'] == 'true') echo 'selected' ?> ><?php print __('yes'); ?></option>
853853
</select>
854854
<br><br>
855855
</td>

0 commit comments

Comments
 (0)