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:
@@ -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
|
||||
{
|
||||
|
@@ -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]);
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user