Commit d2a2763f4d68af204163ad5a08d25fd451ba2ace
1 parent
97d1c981
Exists in
master
and in
63 other branches
Fix test used to know if a templated parameter must be regenerated or not
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
src/InputOutput/IHMImpl/Tools/IHMParamTemplateClass.php
@@ -161,8 +161,7 @@ class IHMParamTemplateClass | @@ -161,8 +161,7 @@ class IHMParamTemplateClass | ||
161 | if (file_exists($dstFilePath)) { | 161 | if (file_exists($dstFilePath)) { |
162 | $dateModifDst = filemtime($dstFilePath); | 162 | $dateModifDst = filemtime($dstFilePath); |
163 | $dateModifTemplate = filemtime($templatePath); | 163 | $dateModifTemplate = filemtime($templatePath); |
164 | - | ||
165 | - if ($dateModifTemplate != $dateModifDst) | 164 | + if ($dateModifTemplate == $dateModifDst) |
166 | //no modification - reuse old generated file | 165 | //no modification - reuse old generated file |
167 | return $dstFilePath; | 166 | return $dstFilePath; |
168 | } | 167 | } |
@@ -274,7 +273,7 @@ class IHMParamTemplateClass | @@ -274,7 +273,7 @@ class IHMParamTemplateClass | ||
274 | return; | 273 | return; |
275 | foreach ($arguments as $arg_key => $arg_def) { | 274 | foreach ($arguments as $arg_key => $arg_def) { |
276 | if (!array_key_exists($arg_key, $template_args)) | 275 | if (!array_key_exists($arg_key, $template_args)) |
277 | - $template_args[$arg_key] = $arg_def->default; | 276 | + $template_args[$arg_key] = $arg_def['default']; |
278 | } | 277 | } |
279 | } | 278 | } |
280 | 279 |