hotfix netsync
This commit is contained in:
parent
a3909860d2
commit
e8f1eb27b6
|
|
@ -58,6 +58,11 @@ class Netsync extends Plugin
|
|||
if (count($diff) > 0) {
|
||||
$wrapper["networks"] = array_values($remote_enabled);
|
||||
$wrapper->save();
|
||||
}
|
||||
|
||||
$last_hash = $this->config["last_hash"] ?? "";
|
||||
$current_hash = md5(json_encode($remote_config));
|
||||
if ($last_hash != $current_hash) {
|
||||
foreach ($this->context->getRPC()->getPlugins() as $plugin) {
|
||||
/**
|
||||
* @var IPluggable $plugin
|
||||
|
|
@ -65,6 +70,8 @@ class Netsync extends Plugin
|
|||
|
||||
$plugin->onSync($remote_config);
|
||||
}
|
||||
$this->config["last_hash"] = $current_hash;
|
||||
$this->saveConfig();
|
||||
}
|
||||
|
||||
return $diff;
|
||||
|
|
|
|||
Loading…
Reference in New Issue