Loading src/UnicaenRenderer/Service/Template/TemplateService.php +2 −2 Original line number Diff line number Diff line Loading @@ -245,12 +245,12 @@ class TemplateService { $sujet = $template->getSujet(); preg_match_all('/VAR\[[^[\]]+#[^[\]]+\]/', $sujet, $matches); $macrosSujet[$template->getCode()] = $matches[0]; foreach($matches[0] as $macro) $rMacroSujet[$macro][] = $template->getCode(); foreach($matches[0] as $macro) $rMacroSujet[$macro][$template->getCode()] = $template->getCode(); $corps = $template->getCorps(); preg_match_all('/VAR\[[^[\]]+#[^[\]]+\]/', $corps, $matches); $macrosCorps[$template->getCode()] = $matches[0]; foreach($matches[0] as $macro) $rMacroCorps[$macro][] = $template->getCode(); foreach($matches[0] as $macro) $rMacroCorps[$macro][$template->getCode()] = $template->getCode(); } return [$macrosSujet, $macrosCorps, $rMacroSujet, $rMacroCorps]; Loading Loading
src/UnicaenRenderer/Service/Template/TemplateService.php +2 −2 Original line number Diff line number Diff line Loading @@ -245,12 +245,12 @@ class TemplateService { $sujet = $template->getSujet(); preg_match_all('/VAR\[[^[\]]+#[^[\]]+\]/', $sujet, $matches); $macrosSujet[$template->getCode()] = $matches[0]; foreach($matches[0] as $macro) $rMacroSujet[$macro][] = $template->getCode(); foreach($matches[0] as $macro) $rMacroSujet[$macro][$template->getCode()] = $template->getCode(); $corps = $template->getCorps(); preg_match_all('/VAR\[[^[\]]+#[^[\]]+\]/', $corps, $matches); $macrosCorps[$template->getCode()] = $matches[0]; foreach($matches[0] as $macro) $rMacroCorps[$macro][] = $template->getCode(); foreach($matches[0] as $macro) $rMacroCorps[$macro][$template->getCode()] = $template->getCode(); } return [$macrosSujet, $macrosCorps, $rMacroSujet, $rMacroCorps]; Loading