check set result in install

pull/128/head
root 2020-08-18 10:00:28 +08:00
parent ce4fc41443
commit 0a7887409c
5 changed files with 30 additions and 5 deletions

View File

@ -121,7 +121,12 @@ function install()
global $constStr; global $constStr;
if ($_GET['install2']) { if ($_GET['install2']) {
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
setConfig($tmp); $response = setConfigResponse( setConfig($tmp) );
if (api_error($response)) {
$html = api_error_msg($response);
$title = 'Error';
return message($html, $title, 201);
}
if (needUpdate()) { if (needUpdate()) {
OnekeyUpate(); OnekeyUpate();
return message('update to github version, reinstall. return message('update to github version, reinstall.

View File

@ -145,7 +145,12 @@ function install()
global $contextUserData; global $contextUserData;
if ($_GET['install2']) { if ($_GET['install2']) {
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
setConfig($tmp); $response = setConfigResponse( setConfig($tmp) );
if (api_error($response)) {
$html = api_error_msg($response);
$title = 'Error';
return message($html, $title, 201);
}
if (needUpdate()) { if (needUpdate()) {
OnekeyUpate(); OnekeyUpate();
return message('update to github version, reinstall. return message('update to github version, reinstall.

View File

@ -145,7 +145,12 @@ function install()
global $contextUserData; global $contextUserData;
if ($_GET['install2']) { if ($_GET['install2']) {
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
setConfig($tmp); $response = setConfigResponse( setConfig($tmp) );
if (api_error($response)) {
$html = api_error_msg($response);
$title = 'Error';
return message($html, $title, 201);
}
if (needUpdate()) { if (needUpdate()) {
OnekeyUpate(); OnekeyUpate();
return message('update to github version, reinstall. return message('update to github version, reinstall.

View File

@ -127,7 +127,12 @@ function install()
global $constStr; global $constStr;
if ($_GET['install2']) { if ($_GET['install2']) {
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
setConfig($tmp); $response = setConfigResponse( setConfig($tmp) );
if (api_error($response)) {
$html = api_error_msg($response);
$title = 'Error';
return message($html, $title, 201);
}
if (needUpdate()) { if (needUpdate()) {
OnekeyUpate(); OnekeyUpate();
return message('update to github version, reinstall. return message('update to github version, reinstall.

View File

@ -137,7 +137,12 @@ function install()
global $constStr; global $constStr;
if ($_GET['install2']) { if ($_GET['install2']) {
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
setConfig($tmp); $response = setConfigResponse( setConfig($tmp) );
if (api_error($response)) {
$html = api_error_msg($response);
$title = 'Error';
return message($html, $title, 201);
}
if (needUpdate()) { if (needUpdate()) {
OnekeyUpate(); OnekeyUpate();
return message('update to github version, reinstall. return message('update to github version, reinstall.