mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-16 10:18:41 +00:00
test fixes + new test data
This commit is contained in:
parent
09698caa0a
commit
4f50728503
|
|
@ -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__;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -285,14 +285,14 @@ final class ApiController extends Controller
|
||||||
foreach ($uploaded as $media) {
|
foreach ($uploaded as $media) {
|
||||||
$accountPath = '/Accounts/' . $account->id . ' ' . $account->login
|
$accountPath = '/Accounts/' . $account->id . ' ' . $account->login
|
||||||
. '/Editor/'
|
. '/Editor/'
|
||||||
. $doc->createdAt->format('Y') . '/' . $doc->createdAt->format('m')
|
. $doc->createdAt->format('Y/m')
|
||||||
. '/' . $doc->id;
|
. '/' . $doc->id;
|
||||||
|
|
||||||
if ($collection === null) {
|
if ($collection === null) {
|
||||||
$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 . '/Editor/' . $doc->createdAt->format('Y') . '/' . $doc->createdAt->format('m') . '/' . $doc->id
|
__DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Editor/' . $doc->createdAt->format('Y/m') . '/' . $doc->id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -381,9 +381,7 @@ final class ApiController extends Controller
|
||||||
private function createEditorDir(EditorDoc $doc) : string
|
private function createEditorDir(EditorDoc $doc) : string
|
||||||
{
|
{
|
||||||
return '/Modules/Editor/'
|
return '/Modules/Editor/'
|
||||||
. $doc->createdAt->format('Y') . '/'
|
. $doc->createdAt->format('Y/m/d') . '/'
|
||||||
. $doc->createdAt->format('m') . '/'
|
|
||||||
. $doc->createdAt->format('d') . '/'
|
|
||||||
. $doc->id;
|
. $doc->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class BaseView extends View
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $id = '';
|
public string $id = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class TextView extends View
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $id = '';
|
public string $id = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dom name
|
* Dom name
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user