chg: [internal] Use checkMISPVersion rather than duplicate impl

pull/5216/head
Jakub Onderka 2019-09-24 18:30:19 +02:00 committed by GitHub
parent cebe7de575
commit 22aac8e235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -4054,10 +4054,7 @@ class Server extends AppModel
if (empty($user)) {
$user = array('Organisation' => array('name' => 'SYSTEM'), 'email' => 'SYSTEM', 'id' => 0);
}
App::uses('Folder', 'Utility');
$file = new File(ROOT . DS . 'VERSION.json', true);
$localVersion = json_decode($file->read(), true);
$file->close();
$localVersion = $this->checkMISPVersion();
$server = $this->find('first', array('conditions' => array('Server.id' => $id)));
$HttpSocket = $this->setupHttpSocket($server, $HttpSocket);
$request = $this->setupSyncRequest($server);