From bd38db17e8bc5e987fadae13ceba2d4e0f7915f8 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sun, 16 Jul 2023 23:46:09 +0200 Subject: [PATCH] fix install check context --- _define.php | 2 +- dcstore.xml | 4 ++-- src/My.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_define.php b/_define.php index 7a476e1..c3a0ecb 100644 --- a/_define.php +++ b/_define.php @@ -18,7 +18,7 @@ $this->registerModule( 'improve', 'Tiny tools to fix things for module devs', 'Jean-Christian Denis and contributors', - '1.3.1', + '1.3.2', [ 'requires' => [ ['php', '8.1'], diff --git a/dcstore.xml b/dcstore.xml index 9d9dccf..8dd2e6a 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,10 +2,10 @@ improve - 1.3.1 + 1.3.2 Jean-Christian Denis and contributors Tiny tools to fix things for module devs - https://github.com/JcDenis/improve/releases/download/v1.3.1/plugin-improve.zip + https://github.com/JcDenis/improve/releases/download/v1.3.2/plugin-improve.zip 2.27 https://github.com/JcDenis/improve https://github.com/JcDenis/improve diff --git a/src/My.php b/src/My.php index 3aa9e14..ee1fbf5 100644 --- a/src/My.php +++ b/src/My.php @@ -21,7 +21,7 @@ class My extends MyPlugin { protected static function checkCustomContext(int $context): ?bool { - return defined('DC_CONTEXT_ADMIN') - && dcCore::app()->auth->isSuperAdmin(); + return $context === My::INSTALL ? null : + defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->isSuperAdmin(); } }