From f396454830c263610c7474d6f5b3519f43834803 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 19 May 2023 02:37:35 +0000 Subject: [PATCH] test fixes + new test data --- Admin/Updater.php | 7 +++++++ Controller/ApiController.php | 8 +++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Admin/Updater.php b/Admin/Updater.php index ae1002a..3547ba1 100755 --- a/Admin/Updater.php +++ b/Admin/Updater.php @@ -26,4 +26,11 @@ use phpOMS\Module\UpdaterAbstract; */ final class Updater extends UpdaterAbstract { + /** + * Path of the file + * + * @var string + * @since 1.0.0 + */ + public const PATH = __DIR__; } diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 966149b..f980f67 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -200,7 +200,7 @@ final class ApiController extends Controller $accountPath = '/Accounts/' . $account->id . ' ' . $account->login . '/Comments/' - . $comment->createdAt->format('Y') . '/' . $comment->createdAt->format('m') + . $comment->createdAt->format('Y/m') . '/' . $comment->id; $ref = new Reference(); @@ -215,7 +215,7 @@ final class ApiController extends Controller $collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection( $accountPath, $request->header->account, - __DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Comments/' . $comment->createdAt->format('Y') . '/' . $comment->createdAt->format('m') . '/' . $comment->id + __DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Comments/' . $comment->createdAt->format('Y/m') . '/' . $comment->id ); } @@ -288,9 +288,7 @@ final class ApiController extends Controller private function createCommentDir(Comment $comment) : string { return '/Modules/Comments/' - . $comment->createdAt->format('Y') . '/' - . $comment->createdAt->format('m') . '/' - . $comment->createdAt->format('d') . '/' + . $comment->createdAt->format('Y/m/d') . '/' . $comment->id; }