Skip to content

Commit

Permalink
Removed deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed Jan 27, 2017
1 parent f85f624 commit c26f9bf
Showing 1 changed file with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,8 @@ private function _syncLocalAndRemoteData(array $local, $remote)
{
$result = array();
if ($remote) {
$remote = $remote->toArray();
$result = $remote;
$version = $remote['latest_version'];
$dataVersion = '';
if (isset($remote['data_version'])) {
$dataVersion = $remote['data_version'];
}

unset($result['version']);
unset($result['data_version']);

$result['latest_version'] = $version;
$result['latest_data_version'] = $dataVersion;
$remote = $remote->toArray();
$result = $remote;
$result['version_status'] = $this->_getVersionStatusLabel($local, $remote);
}
return array_merge($local, $result);
Expand All @@ -129,11 +118,8 @@ private function _syncLocalAndRemoteData(array $local, $remote)
*/
private function _getVersionStatusLabel(array $local, array $remote = array())
{
$versionCompare = version_compare($local['version'], $remote['version']);
$versionCompare = version_compare($local['version'], $remote['latest_version']);
$dataCompare = 0;
if (isset($remote['data_version'])) {
$dataCompare = version_compare($local['data_version'], $remote['data_version']);
}
if ($local['available_upgrades']) {
$dataCompare = -1;
}
Expand Down

0 comments on commit c26f9bf

Please sign in to comment.