diff --git a/_install.php b/_install.php index 6320b06..71b6e6b 100644 --- a/_install.php +++ b/_install.php @@ -16,28 +16,15 @@ if (!defined('DC_CONTEXT_ADMIN')) { # -- Nothing to change below -- try { - # Grab info - $mod_id = basename(__DIR__); - $dc_min = dcCore::app()->plugins->moduleInfo($mod_id, 'requires')[0][1]; - # Check module version - if (version_compare( - dcCore::app()->getVersion($mod_id), - dcCore::app()->plugins->moduleInfo($mod_id, 'version'), - '>=' + if (!dcCore::app()->newVersion( + basename(__DIR__), + dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version') )) { return null; } - # Check Dotclear version - if (!method_exists('dcUtils', 'versionsCompare') - || dcUtils::versionsCompare(DC_VERSION, $dc_min, '<', false)) { - throw new Exception(sprintf( - '%s requires Dotclear %s', - $mod_id, - $dc_min - )); - } + //... return true; } catch (Exception $e) {