Fix incorrect xml file path in ZIP creation
phpcs-errors:0 phpunit-status:successful phpstan-errors:1
This commit is contained in:
parent
a8cb46848b
commit
65e09278dc
|
@ -19,6 +19,7 @@ else if (!isset($_SESSION['lang'])) {
|
|||
$_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 @@ foreach ($availableFields as $categoryName => $fieldCategory) {
|
|||
$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 @@ if ($hasanyimage > 0) {
|
|||
//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?
|
||||
|
|
|
@ -39,7 +39,7 @@ while ($zeile = fgetcsv($fp, 100000, ';')) {
|
|||
|
||||
$y++;
|
||||
|
||||
$zieldatei = 'xml/' . $y . '.xml';
|
||||
$zieldatei = __DIR__ . '/../xml/' . $y . '.xml';
|
||||
if (!$handle = fopen($zieldatei, 'w')) {
|
||||
echo "Cannot open file ($zieldatei)";exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user