auto grab module info

This commit is contained in:
Jean-Christian Denis 2022-12-03 16:44:26 +01:00
parent 082926c80b
commit 6f01127ef2
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -14,12 +14,12 @@ if (!defined('DC_CONTEXT_ADMIN')) {
return null;
}
# -- Module specs --
$dc_min = '2.24';
$mod_id = 'postExpired';
# -- 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),