patch article tags (#42486)

This commit is contained in:
Nicola Galgano 2024-01-02 12:49:29 +01:00 committed by GitHub
parent f97a4c5ea7
commit 56bf784959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -115,9 +115,11 @@ class ArticlesController extends ApiController
}
}
$tags = new TagsHelper();
$tags->getTagIds($data['id'], 'com_content.article');
$data['tags'] = explode(',', $tags->tags);
if (($this->input->getMethod() === 'PATCH') && !(\array_key_exists('tags', $data))) {
$tags = new TagsHelper();
$tags->getTagIds($data['id'], 'com_content.article');
$data['tags'] = explode(',', $tags->tags);
}
return $data;
}