Update mastodonapi.php
This commit is contained in:
parent
dd8a402bb0
commit
55b41aad48
1 changed files with 2 additions and 2 deletions
|
|
@ -110,7 +110,6 @@ class YellowMastodonapi {
|
|||
$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);
|
||||
|
|
@ -134,6 +133,7 @@ class YellowMastodonapi {
|
|||
$defaultAuthor, $defaultTag, $imageFilenames, $imageAltTexts, $statusSetting
|
||||
);
|
||||
file_put_contents($fullPath, $markdownContent);
|
||||
chmod($fullPath, 0666);
|
||||
$postsCreated++;
|
||||
}
|
||||
return $postsCreated;
|
||||
|
|
@ -144,7 +144,6 @@ 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);
|
||||
|
|
@ -168,6 +167,7 @@ class YellowMastodonapi {
|
|||
|
||||
if ( !$imgData ) return false;
|
||||
file_put_contents($fullPath, $imgData);
|
||||
chmod($fullPath, 0666);
|
||||
return $fileName;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue