Fix incorrect xml file path in ZIP creation

phpcs-errors:0 phpunit-status:successful phpstan-errors:1
This commit is contained in:
jrenslin authored and stefan committed 2020-11-08 14:44:06 +01:00
1 parent a8cb46848b
commit 65e09278dc
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -19,6 +19,7 @@
$_SESSION['lang'] = MD_STD::lang_getfrombrowser($allowed_langs, 'en', "", false);
}
$lang = $_SESSION['lang'];
$tlLoader = new MDTlLoader("csxml_evaluate", $lang);
$filename = $_GET['fnam'];
$csv_datei = MD_STD::realpath(__DIR__ . '/../csv/' . $filename);
@@ -34,7 +35,7 @@
$allowed = array_merge($allowed, array_keys($fieldCategory));
// Extended operations for events
if (strpos($categoryName, $basis['event']) !== false) {
if (strpos($categoryName, $tlLoader->tl("basis", "basis", 'event')) !== false) {
foreach ($fieldCategory as $key => $value) {
if (strpos($key, "_annotation") !== false or strpos($key, "_gnd") !== false) continue;
if (strpos($key, "_sure") !== false) $eventpartsure[] = $key;
@@ -339,7 +340,7 @@ function get_duplicates(array $array):array {
//check if in a row any image_name is given
$maimg = $hatimg = 0;
foreach ($imagemain as $im => $tMainImage) {
if ($inhalt[$i][$tMainImage] != '') $hatimg++;
if ($inhalt[$i][$tMainImage["name"]] != '') $hatimg++;
}
if ($hatimg > 0) {
// first check: how many main-images?
+1 -1
View File
@@ -39,7 +39,7 @@
$y++;
$zieldatei = 'xml/' . $y . '.xml';
$zieldatei = __DIR__ . '/../xml/' . $y . '.xml';
if (!$handle = fopen($zieldatei, 'w')) {
echo "Cannot open file ($zieldatei)";exit;
}