From 6f01127ef27c15cf90f959be2d27604c97a7b3ac Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 3 Dec 2022 16:44:26 +0100 Subject: [PATCH] auto grab module info --- _install.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_install.php b/_install.php index 2a0511d..a290932 100644 --- a/_install.php +++ b/_install.php @@ -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),