Change '{method} authors' (which gives 'Tag_entries authors' when
exporting a tag) to 'Various authors'.
When exporting a tag (tag_entries), change the title from 'Tag_entries
articles' to 'Tag {tag} articles'.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
$method = ucfirst($category);
$methodBuilder = 'getBuilderFor' . $method . 'ByUser';
$repository = $this->get('wallabag_core.entry_repository');
+ $title = $method;
if ('tag_entries' === $category) {
$tag = $this->get('wallabag_core.tag_repository')->findOneBySlug($request->query->get('tag'));
$this->getUser()->getId(),
$tag->getId()
);
+
+ $title = 'Tag ' . $tag->getLabel();
} else {
$entries = $repository
->$methodBuilder($this->getUser()->getId())
try {
return $this->get('wallabag_core.helper.entries_export')
->setEntries($entries)
- ->updateTitle($method)
+ ->updateTitle($title)
->updateAuthor($method)
->exportAs($format);
} catch (\InvalidArgumentException $e) {
public function updateAuthor($method)
{
if ('entry' !== $method) {
- $this->author = $method . ' authors';
+ $this->author = 'Various authors';
return $this;
}