diff --git a/application/utils.inc.php b/application/utils.inc.php index 229e6b5ba..f60caca8d 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -2266,7 +2266,7 @@ SQL; */ public static function GetCurrentModuleName($iCallDepth = 0) { - return ModuleService::GetInstance()->GetCurrentModuleName($iCallDepth = 0); + return ModuleService::GetInstance()->GetCurrentModuleName($iCallDepth + 1); } /** @@ -2303,7 +2303,7 @@ SQL; */ public static function GetCurrentModuleUrl() { - return ModuleService::GetInstance()->GetCurrentModuleUrl(); + return ModuleService::GetInstance()->GetCurrentModuleUrl(1); } /** diff --git a/sources/Service/Module/ModuleService.php b/sources/Service/Module/ModuleService.php index 5370f7bbe..c41961c1a 100644 --- a/sources/Service/Module/ModuleService.php +++ b/sources/Service/Module/ModuleService.php @@ -117,9 +117,9 @@ class ModuleService * * @uses GetCurrentModuleDir */ - public function GetCurrentModuleUrl(): string + public function GetCurrentModuleUrl(int $iCallDepth = 0): string { - $sDir = $this->GetCurrentModuleDir(1); + $sDir = $this->GetCurrentModuleDir(1 + $iCallDepth); if ( $sDir !== '') { return utils::GetAbsoluteUrlModulesRoot().'/'.$sDir;