Skip to content

Commit

Permalink
backport skip
Browse files Browse the repository at this point in the history
  • Loading branch information
llecaque committed Feb 12, 2016
1 parent 5488e99 commit 7ed3a9a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions common/ext/class.ExtensionUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ public function isBetween($minVersion, $maxVersion)
return version_compare($minVersion, $current, '<=') && version_compare($current, $maxVersion, '<=');
}

/**
* Skip from version FROM to version TO without additional required actions
*
* @param string $from
* @param string $to
*/
public function skip($from, $to)
{
$current = common_ext_ExtensionsManager::singleton()->getInstalledVersion($this->getExtension()->getId());
if (version_compare($from, $current, '<=') && version_compare($current, $to, '<')) {
$this->setVersion($to);
}
}

/**
* Loads a service in a "safe" way, trying to convert
* unknown classes to abstract services
Expand Down

0 comments on commit 7ed3a9a

Please sign in to comment.