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