1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-30 19:00:32 +02:00

Version 1.3.6

This commit is contained in:
trendschau
2020-04-30 08:48:29 +02:00
parent 2abef9bc72
commit a20adbadf6
16 changed files with 260 additions and 20 deletions

View File

@@ -84,9 +84,9 @@ class ArticleApiController extends ContentController
# dispatch event
$page = ['content' => $this->content, 'meta' => $meta, 'item' => $this->item];
$this->c->dispatcher->dispatch('onPagePublished', new OnPagePublished($page));
$page = $this->c->dispatcher->dispatch('onPagePublished', new OnPagePublished($page))->getData();
return $response->withJson(['success' => true, 'meta' => $meta], 200);
return $response->withJson(['success' => true, 'meta' => $page['meta']], 200);
}
else
{

View File

@@ -108,6 +108,11 @@ class MediaApiController extends ContentController
if($imageProcessor->createImage($this->params['image'], $this->params['name'], $this->settings['images']))
{
# publish image directly, used for example by image field for meta-tabs
if($this->params['publish'])
{
$imageProcessor->publishImage();
}
return $response->withJson(['name' => 'media/live/' . $imageProcessor->getFullName(),'errors' => false]);
}

View File

@@ -272,10 +272,10 @@ class MetaApiController extends ContentController
}
# add the new/edited metadata
$meta[$tab] = $metaInput;
$metaPage[$tab] = $metaInput;
# store the metadata
$writeMeta->updateYaml($this->settings['contentFolder'], $this->item->pathWithoutType . '.yaml', $meta);
$writeMeta->updateYaml($this->settings['contentFolder'], $this->item->pathWithoutType . '.yaml', $metaPage);
if($structure)
{