diff --git a/application/utils.inc.php b/application/utils.inc.php index 2746aff099..3a4f993931 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -1978,7 +1978,7 @@ public static function GetCurrentModuleDir($iCallDepth) */ 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 5370f7bbe7..c41961c1a6 100644 --- a/sources/Service/Module/ModuleService.php +++ b/sources/Service/Module/ModuleService.php @@ -117,9 +117,9 @@ public function GetCurrentModuleDir(int $iCallDepth): string * * @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;