Skip to content

Commit c044303

Browse files
authored
Merge pull request #35 from jeedom/fix/dependency-check
Fix/dependency check
2 parents 8f9f861 + 2aae19c commit c044303

1 file changed

Lines changed: 4 additions & 27 deletions

File tree

core/class/zwavejs.class.php

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -287,34 +287,11 @@ public static function postConfig_zwavejs_mode($_value) {
287287
}
288288

289289
public static function additionnalDependancyCheck() {
290-
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
291-
$return = array();
292-
$return['state'] = 'ok';
293-
return $return;
294-
}
295-
$return = array();
296-
$return['state'] = 'ok';
297-
if (config::byKey('lastDependancyInstallTime', __CLASS__) == '') {
298-
$return['state'] = 'nok';
299-
} else if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) {
300-
$return['state'] = 'nok';
301-
}
302-
return $return;
303-
}
304-
305-
public static function dependancy_info() {
306-
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
307-
$return = array();
308-
$return['state'] = 'ok';
309-
return $return;
310-
}
311290
$return = array();
312-
$return['progress_file'] = jeedom::getTmpFolder(__CLASS__) . '/dependance';
313-
$return['state'] = 'ok';
314-
if (config::byKey('lastDependancyInstallTime', __CLASS__) == '') {
315-
$return['state'] = 'nok';
316-
} else if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) {
317-
$return['state'] = 'nok';
291+
if (config::byKey('zwavejs::mode', __CLASS__) === 'local') {
292+
if (!file_exists(__DIR__ . '/../../resources/zwave-js-ui/node_modules')) {
293+
$return['state'] = 'nok';
294+
}
318295
}
319296
return $return;
320297
}

0 commit comments

Comments
 (0)