Stadionzeitung Untersteinach vorbereiten und Instagram aktualisieren
This commit is contained in:
@@ -393,6 +393,21 @@ if (is_file($szFile)) {
|
||||
if (is_file($szFile)) {
|
||||
$szData = $szData ?? (json_decode((string) file_get_contents($szFile), true) ?: []);
|
||||
foreach ($szData['issues'] ?? [] as $ausgabe) {
|
||||
if (is_array($ausgabe['rueckblick'] ?? null)) {
|
||||
$rueckblick = $ausgabe['rueckblick'];
|
||||
$foto = $rueckblick['image'] ?? [];
|
||||
if (empty($foto['base']) || empty($foto['widths'])) {
|
||||
$errors[] = "Stadionzeitung '{$ausgabe['slug']}': Foto zum Spielrückblick fehlt.";
|
||||
}
|
||||
foreach ($foto['widths'] ?? [] as $w) {
|
||||
if (!is_file(PUBLIC_PATH . '/assets/' . ($foto['base'] ?? '') . "-{$w}.jpg")) {
|
||||
$errors[] = "Stadionzeitung '{$ausgabe['slug']}': Rückblick-Foto fehlt ({$w}px).";
|
||||
}
|
||||
}
|
||||
if (trim((string) ($rueckblick['credit'] ?? '')) === '') {
|
||||
$errors[] = "Stadionzeitung '{$ausgabe['slug']}': Bildnachweis zum Spielrückblick fehlt.";
|
||||
}
|
||||
}
|
||||
foreach ($ausgabe['galerie']['bilder'] ?? [] as $bild) {
|
||||
foreach ($bild['widths'] ?? [] as $w) {
|
||||
$datei = PUBLIC_PATH . '/assets/' . ($bild['base'] ?? '') . "-{$w}.jpg";
|
||||
|
||||
Reference in New Issue
Block a user