Fix visibility of the link "Uninstall" on Windows server (#6378)

* Fix visibility of the link "Uninstall" on Windows server

* Use file normalizator
This commit is contained in:
Yuriy Bakhtin 2023-06-08 16:51:44 +04:00 committed by GitHub
parent 34211c3c17
commit c7f2217cd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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)
----------------------

View File

@ -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;
}
}