Skip to content

Commit 29b1935

Browse files
authored
Fix issue with beta (hestiacp#2583)
* Resolve issue with Wordpress install * Resolve php error when adding new user * resolve php error
1 parent bef2759 commit 29b1935

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

bin/v-run-cli-cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ if [ "$clicmd" = "wp" ]; then
4444
fi
4545

4646
if [ -z "$(which "$clicmd")" ]; then
47-
check_result "$E_NOTEXIST" "Error: Cli command does not exist"
47+
check_result "$E_NOTEXIST" "Cli command does not exist $clicmd"
4848
fi
4949
basecmd="$(basename "$clicmd")"
5050

web/add/user/index.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,8 @@
9696

9797
// Set login restriction
9898
if (empty($_SESSION['error_msg'])) {
99-
if ($_POST['v_login_disabled']) {
100-
if ($_POST['v_login_disabled'] == 'on') {
101-
$_POST['v_login_disabled'] = 'yes';
102-
} else {
103-
$_POST['v_login_disabled'] = 'no';
104-
}
99+
if (!empty($_POST['v_login_disabled'])) {
100+
$_POST['v_login_disabled'] = 'yes';
105101
exec(HESTIA_CMD."v-change-user-config-value ".$v_username." LOGIN_DISABLED ".escapeshellarg($_POST['v_login_disabled']), $output, $return_var);
106102
check_return_code($return_var, $output);
107103
unset($output);

web/src/app/System/HestiaApp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ public function runComposer($args, &$cmd_result=null, $version=1): bool
118118

119119
public function runWp($args, &$cmd_result=null): bool
120120
{
121-
$wp = $this->getUserHomeDir() . DIRECTORY_SEPARATOR . '.wp' . DIRECTORY_SEPARATOR . 'wp';
121+
$wp = $this->getUserHomeDir() . DIRECTORY_SEPARATOR . '.wp-cli' . DIRECTORY_SEPARATOR . 'wp';
122122
if (!is_file($wp)) {
123-
$this -> runUser('v-add-user-wp-cli');
123+
$this -> runUser('v-add-user-wp-cli', []);
124124
} else {
125125
$this->runUser('v-run-cli-cmd', [$wp, 'cli', 'update']);
126126
}

web/templates/pages/setup_webapp.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
$key = $option;
7272
}
7373
?>
74-
<?php $selected = (!empty($form_control['value']) && $option === $form_control['value'])?'selected':''?>
74+
<?php $selected = (!empty($form_control['value']) && $key == $form_control['value'])?'selected':''?>
7575
<option value="<?=$key?>" <?=$selected?>><?=htmlentities($option)?></option>
7676
<?php }; ?>
7777
</select>

0 commit comments

Comments
 (0)