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; }