diff --git a/libraries/cms/helper/extensionscript.php b/libraries/cms/helper/extensionscript.php index 0f344524816d1..13e6a17100984 100644 --- a/libraries/cms/helper/extensionscript.php +++ b/libraries/cms/helper/extensionscript.php @@ -66,6 +66,13 @@ class JExtensionscriptHelper */ protected $minimumJoomla; + /** + * @var boolean Allow downgrades of your extension. Use at your own risk + * as if there is a change in functionality people may wish + * to downgrade + */ + protected $allowDowngrades = false; + /** * Function called before module installation/update/removal procedure commences * @@ -106,7 +113,7 @@ public function preflight($type, $parent) } // Abort if the module being installed is not newer than the currently installed version - if ($type == 'Update') + if ($type == 'Update' && $this->allowDowngrades) { $manifest = $this->getItemArray('manifest_cache', '#__extensions', 'element', JFactory::getDbo()->quote($this->extension)); $oldRelease = $manifest['version'];