Update mastodonapi.php
This commit is contained in:
parent
bfeb41fdf1
commit
a187a962ef
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue