mirror of
https://github.com/Karaka-Management/oms-Comments.git
synced 2026-02-18 10:18:42 +00:00
test fixes + new test data
This commit is contained in:
parent
b2dd5d3ed6
commit
f396454830
|
|
@ -26,4 +26,11 @@ use phpOMS\Module\UpdaterAbstract;
|
||||||
*/
|
*/
|
||||||
final class Updater extends UpdaterAbstract
|
final class Updater extends UpdaterAbstract
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Path of the file
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const PATH = __DIR__;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
$accountPath = '/Accounts/' . $account->id . ' ' . $account->login
|
$accountPath = '/Accounts/' . $account->id . ' ' . $account->login
|
||||||
. '/Comments/'
|
. '/Comments/'
|
||||||
. $comment->createdAt->format('Y') . '/' . $comment->createdAt->format('m')
|
. $comment->createdAt->format('Y/m')
|
||||||
. '/' . $comment->id;
|
. '/' . $comment->id;
|
||||||
|
|
||||||
$ref = new Reference();
|
$ref = new Reference();
|
||||||
|
|
@ -215,7 +215,7 @@ final class ApiController extends Controller
|
||||||
$collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection(
|
$collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection(
|
||||||
$accountPath,
|
$accountPath,
|
||||||
$request->header->account,
|
$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
|
private function createCommentDir(Comment $comment) : string
|
||||||
{
|
{
|
||||||
return '/Modules/Comments/'
|
return '/Modules/Comments/'
|
||||||
. $comment->createdAt->format('Y') . '/'
|
. $comment->createdAt->format('Y/m/d') . '/'
|
||||||
. $comment->createdAt->format('m') . '/'
|
|
||||||
. $comment->createdAt->format('d') . '/'
|
|
||||||
. $comment->id;
|
. $comment->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user