Update mastodonapi.php

This commit is contained in:
simonpipe 2026-01-07 19:22:23 +01:00
parent bfeb41fdf1
commit a187a962ef

View file

@ -109,10 +109,13 @@ class YellowMastodonapi {
$fileName = date("Y-m-d", strtotime($createdAt)) . "-" . $titleSlug . ".md";
$fullPath = $this->yellow->system->get("coreServerDocument") . $targetFolder . $fileName;
if ( file_exists($fullPath) ) continue;
// Korrektur Blog-Ordner Rechte
if ( !is_dir(dirname($fullPath)) ) {
mkdir(dirname($fullPath), 0777, true);
chmod(dirname($fullPath), 0777);
}
$imageFilenames = array();
$imageAltTexts = array();
foreach ( $post["media_attachments"] ?? array() as $media ) {
@ -141,6 +144,7 @@ class YellowMastodonapi {
$imageUrl = $media["remote_url"] ?? $media["url"] ?? $media["preview_url"] ?? null;
if ( empty($imageUrl) ) return false;
// Korrektur Bilder-Ordner Rechte
if ( !is_dir($dirPath) ) {
mkdir($dirPath, 0777, true);
chmod($dirPath, 0777);