5959
6060function getDifficultyOfImplementationWithDependencies ($ dimensions , $ elementImplementation , &$ allElements )
6161{
62+ $ aggregated = ($ _GET ['aggregated ' ] ?? false ) == "true " ? "true " : false ;
6263 if ($ elementImplementation == null ) {
6364 return ;
6465 }
@@ -69,7 +70,7 @@ function getDifficultyOfImplementationWithDependencies($dimensions, $elementImpl
6970 $ allElements [] = $ elementImplementation ['difficultyOfImplementation ' ]["time " ];
7071 $ allElements [] = $ elementImplementation ['difficultyOfImplementation ' ]["resources " ];
7172
72- if (array_key_exists ('dependsOn ' , $ elementImplementation ) && $ _GET [ ' aggregated ' ] == "true " ) {
73+ if (array_key_exists ('dependsOn ' , $ elementImplementation ) && $ aggregated == "true " ) {
7374 foreach ($ elementImplementation ['dependsOn ' ] as $ dependency ) {
7475 $ dependencyElement = getElementByName ($ dimensions , $ dependency );
7576 getDifficultyOfImplementationWithDependencies ($ dimensions , $ dependencyElement , $ allElements );
@@ -87,6 +88,7 @@ function getDifficultyOfImplementationWithDependencies($dimensions, $elementImpl
8788
8889function getDifficultyOfImplementation ($ dimensions , $ elementImplementation )
8990{
91+ $ aggregated = ($ _GET ['aggregated ' ] ?? false ) == "true " ? "true " : false ;
9092 if ($ elementImplementation == null ) {
9193 return ;
9294 }
@@ -96,7 +98,7 @@ function getDifficultyOfImplementation($dimensions, $elementImplementation)
9698 $ value = $ knowledge + $ elementImplementation ['difficultyOfImplementation ' ]["time " ] * 2 + $ elementImplementation ['difficultyOfImplementation ' ]["resources " ];
9799 $ value = $ value / 4 ;
98100
99- if (array_key_exists ('dependsOn ' , $ elementImplementation ) && $ _GET [ ' aggregated ' ] == "true " ) {
101+ if (array_key_exists ('dependsOn ' , $ elementImplementation ) && $ aggregated == "true " ) {
100102 foreach ($ elementImplementation ['dependsOn ' ] as $ dependency ) {
101103 $ dependencyElement = getElementByName ($ dimensions , $ dependency );
102104 $ value += getDifficultyOfImplementation ($ dimensions , $ dependencyElement );
0 commit comments