Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/api/jeeApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

if (init('type') != '') {
try {

if (init('type') == 'ask') {
if (trim(init('token')) == '' || strlen(init('token')) < 64) {
throw new Exception(__('Commande inconnue ou Token invalide', __FILE__));
Expand Down Expand Up @@ -1276,7 +1276,7 @@
throw new Exception(__('Vous n\'avez pas les droits de faire cette action', __FILE__), -32701);
}
unautorizedInDemo();
jeedom::update('');
jeedom::update();
$jsonrpc->makeSuccess('ok');
}

Expand Down
2 changes: 1 addition & 1 deletion core/api/proApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@
}

if ($jsonrpc->getMethod() == 'update::update') {
jeedom::update('');
jeedom::update();
$jsonrpc->makeSuccess('ok');
}

Expand Down
6 changes: 2 additions & 4 deletions core/class/jeedom.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,8 @@ public static function restore(string $_backup = '', bool $_background = false)
public static function update(array $_options = []) {
log::clear('update');
$params = '';
if (count($_options) > 0) {
Comment thread
Mips2648 marked this conversation as resolved.
foreach ($_options as $key => $value) {
$params .= '"' . $key . '"="' . $value . '" ';
}
foreach ($_options as $key => $value) {
$params .= '"' . $key . '"="' . $value . '" ';
}
$cmd = __DIR__ . '/../../install/update.php ' . $params;
$cmd .= ' >> ' . log::getPathToLog('update') . ' 2>&1 &';
Expand Down
Loading