Преглед изворни кода

Fix issue with beta (#2583)

* Resolve issue with Wordpress install

* Resolve php error when adding new user

* resolve php error
Jaap Marcus пре 3 година
родитељ
комит
29b19357b3

+ 1 - 1
bin/v-run-cli-cmd

@@ -44,7 +44,7 @@ if [ "$clicmd" = "wp" ]; then
 fi
 
 if [ -z "$(which "$clicmd")" ]; then
-    check_result "$E_NOTEXIST" "Error: Cli command does not exist"
+    check_result "$E_NOTEXIST" "Cli command does not exist $clicmd"
 fi
 basecmd="$(basename "$clicmd")"
 

+ 2 - 6
web/add/user/index.php

@@ -96,12 +96,8 @@ if (!empty($_POST['ok'])) {
 
     // Set login restriction
     if (empty($_SESSION['error_msg'])) {
-        if ($_POST['v_login_disabled']) {
-            if ($_POST['v_login_disabled'] == 'on') {
-                $_POST['v_login_disabled'] = 'yes';
-            } else {
-                $_POST['v_login_disabled'] = 'no';
-            }
+        if (!empty($_POST['v_login_disabled'])) {
+            $_POST['v_login_disabled'] = 'yes';
             exec(HESTIA_CMD."v-change-user-config-value ".$v_username." LOGIN_DISABLED ".escapeshellarg($_POST['v_login_disabled']), $output, $return_var);
             check_return_code($return_var, $output);
             unset($output);

+ 2 - 2
web/src/app/System/HestiaApp.php

@@ -118,9 +118,9 @@ class HestiaApp
 
     public function runWp($args, &$cmd_result=null): bool
     {
-        $wp = $this->getUserHomeDir() . DIRECTORY_SEPARATOR . '.wp' . DIRECTORY_SEPARATOR . 'wp';
+        $wp = $this->getUserHomeDir() . DIRECTORY_SEPARATOR . '.wp-cli' . DIRECTORY_SEPARATOR . 'wp';
         if (!is_file($wp)) {
-            $this -> runUser('v-add-user-wp-cli');
+            $this -> runUser('v-add-user-wp-cli', []);
         } else {
             $this->runUser('v-run-cli-cmd', [$wp, 'cli', 'update']);
         }

+ 1 - 1
web/templates/pages/setup_webapp.html

@@ -71,7 +71,7 @@
 										$key = $option;
 									}
 								?>
-									<?php $selected = (!empty($form_control['value']) && $option === $form_control['value'])?'selected':''?>
+									<?php $selected = (!empty($form_control['value']) && $key == $form_control['value'])?'selected':''?>
 									<option value="<?=$key?>" <?=$selected?>><?=htmlentities($option)?></option>
 								<?php }; ?>
 							</select>