Fixed tags not being saved on new pages

This commit is contained in:
Dan Brown 2016-05-15 14:15:05 +01:00
parent db2af47286
commit eebad3e2a0
2 changed files with 5 additions and 4 deletions

View File

@ -2,12 +2,8 @@ language: php
php:
- 7.0
node_js:
- "4.1.2"
cache:
directories:
- node_modules
- vendor
addons:

View File

@ -145,6 +145,11 @@ class PageRepo extends EntityRepo
{
$draftPage->fill($input);
// Save page tags if present
if(isset($input['tags'])) {
$this->tagRepo->saveTagsToEntity($draftPage, $input['tags']);
}
$draftPage->slug = $this->findSuitableSlug($draftPage->name, $draftPage->book->id);
$draftPage->html = $this->formatHtml($input['html']);
$draftPage->text = strip_tags($draftPage->html);