From 7f04abe807232dbe2a1ad040060b3c127cf0ddaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Sun, 15 Sep 2024 17:00:58 +0900 Subject: [PATCH] Automation init...3 --- app/Libraries/Mangboard/BoardLibrary.php | 2 +- app/Libraries/Mangboard/FileLibrary.php | 2 +- app/Libraries/MyStorage/MangboardStorage.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Libraries/Mangboard/BoardLibrary.php b/app/Libraries/Mangboard/BoardLibrary.php index e17c3d4..02619e7 100644 --- a/app/Libraries/Mangboard/BoardLibrary.php +++ b/app/Libraries/Mangboard/BoardLibrary.php @@ -53,7 +53,7 @@ class BoardLibrary extends CommonLibrary $formDatas['content'] = ""; foreach ($storages as $storage) { if ($formDatas['image_path'] == "") { - $formDatas['image_path'] = sprintf("%s/%s/%s", $storage->getBasePath(), $storage->getPath(), $storage->getOriginName()); + $formDatas['image_path'] = $storage->getBasePath() . DIRECTORY_SEPARATOR . $storage->getPath() . DIRECTORY_SEPARATOR . $storage->getOriginName(); } $formDatas['content'] .= $storage->getHTMLTag(); } diff --git a/app/Libraries/Mangboard/FileLibrary.php b/app/Libraries/Mangboard/FileLibrary.php index 9b1d3bb..9d5ce53 100644 --- a/app/Libraries/Mangboard/FileLibrary.php +++ b/app/Libraries/Mangboard/FileLibrary.php @@ -46,7 +46,7 @@ class FileLibrary extends CommonLibrary $formDatas['user_name'] = $this->getUserEntity()->getTitle(); $formDatas['board_name'] = $this->getBoardsEntity()->getTitle(); $formDatas['table_name'] = $this->getModel()->getTable(); - $formDatas['file_path'] = $storage->getPath() . DIRECTORY_SEPARATOR . $storage->getOriginName(); + $formDatas['file_path'] = $storage->getBasePath() . DIRECTORY_SEPARATOR . $storage->getPath() . DIRECTORY_SEPARATOR . $storage->getOriginName(); $formDatas['file_name'] = $storage->getOriginName(); $formDatas['file_type'] = $storage->getMimeType(); $formDatas['file_caption'] = $storage->getOriginName(); diff --git a/app/Libraries/MyStorage/MangboardStorage.php b/app/Libraries/MyStorage/MangboardStorage.php index 6d29a3a..a8957a8 100644 --- a/app/Libraries/MyStorage/MangboardStorage.php +++ b/app/Libraries/MyStorage/MangboardStorage.php @@ -21,7 +21,7 @@ class MangboardStorage extends FileStorage } public function getUploadURL(): string { - return sprintf("/wp-content/%s/%s", parent::getUploadURL(), $this->getBasePath()); + return sprintf("/wp-content/%s/%s/%s", parent::getUploadURL(), $this->getBasePath(), $this->getBasePath()); } public function getModel(): FileModel {