This commit is contained in:
2024-10-22 01:26:34 +02:00
parent f1bb88abec
commit c01cfb631b
11 changed files with 48 additions and 48 deletions

View File

@ -41,8 +41,8 @@ $xml = new DOMDocument();
$xml->load($tempPath);
`rm "$tempPath"`;
$saveAsURL = $options["saveAs"]?? false ? "$BASEDIR/$SCANSDIR/{$options["saveAs"]}.xml" : "";
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='savedAs' value='".htmlentities($saveAsURL, ENT_QUOTES)."'"), $xml->documentElement);
$thisURL = $options["saveAs"]?? false ? "$BASEDIR/$SCANSDIR/{$options["saveAs"]}.xml" : "";
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='thisURL' value='".htmlentities($thisURL, ENT_QUOTES)."'"), $xml->documentElement);
foreach ($options as $option => $value) {
if (substr($option, 0, 1) != '-') {
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='$option' value='".htmlentities($value, ENT_QUOTES)."'"), $xml->documentElement);