Commit 9dbe026826078870e690cafe227df879a706c4b1
1 parent
59d845ce
Exists in
master
and in
31 other branches
Add predefined template parameters
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
update_amda/mvTemplates.php
... | ... | @@ -45,5 +45,18 @@ |
45 | 45 | $to = "$PARAMTEMPLATEDIR/$fileName.xml"; |
46 | 46 | copy($from,$to); |
47 | 47 | } |
48 | + // for predefined params | |
49 | + $predefinedNodes = $template->getElementsByTagName('predefined'); | |
50 | + if ($predefinedNodes->length > 0) { | |
51 | + $paramPredefinedNodes = $predefinedNodes->item(0)->getElementsByTagName('param'); | |
52 | + if ($paramPredefinedNodes->length > 0) { | |
53 | + if (file_exists("$AMDAINTERNALDIR/PARAM_DEF/$paramId.xml")) { | |
54 | + echo "Template ".$paramId.PHP_EOL; | |
55 | + $from = "$AMDAINTERNALDIR/PARAM_DEF/$paramId.xml"; | |
56 | + $to = "$PARAMTEMPLATEDIR/$fileName.xml"; | |
57 | + copy($from,$to); | |
58 | + } | |
59 | + } | |
60 | + } | |
48 | 61 | } |
49 | 62 | ?> | ... | ... |