From c7f2217cd05051431743c6f3fbf6e5c3c92eb46a Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Thu, 8 Jun 2023 16:51:44 +0400 Subject: [PATCH] Fix visibility of the link "Uninstall" on Windows server (#6378) * Fix visibility of the link "Uninstall" on Windows server * Use file normalizator --- CHANGELOG.md | 3 ++- protected/humhub/components/ModuleManager.php | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0391f30dd2..c3e0fa13d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ HumHub Changelog - Fix #6351: Error when config `defaultReloadableScripts` is not array - Fix #6359: Avoid double call of `afterSave` on creating of a published content - Fix #6373: Use integer format for Content columns "visibility" and "state" right after creating -- Fix #6377: Forgot Password - Display email input error after successful captcha verification. +- Fix #6377: Forgot Password - Display email input error after successful captcha verification. +- Fix #6378: Fix visibility of the link "Uninstall" on Windows server 1.14.2 (May 22, 2023) ---------------------- diff --git a/protected/humhub/components/ModuleManager.php b/protected/humhub/components/ModuleManager.php index 5174fe2e71..1a8b9e06bc 100644 --- a/protected/humhub/components/ModuleManager.php +++ b/protected/humhub/components/ModuleManager.php @@ -434,7 +434,10 @@ class ModuleManager extends Component /** @var ModuleMarketplace $marketplaceModule */ $marketplaceModule = Yii::$app->getModule('marketplace'); if ($marketplaceModule !== null) { - if (strpos($module->getBasePath(), Yii::getAlias($marketplaceModule->modulesPath)) !== false) { + // Normalize paths before comparing in order to fix issues like Windows path separators `\` + $modulePath = FileHelper::normalizePath($module->getBasePath()); + $aliasPath = FileHelper::normalizePath(Yii::getAlias($marketplaceModule->modulesPath)); + if (strpos($modulePath, $aliasPath) !== false) { return true; } }