diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index aca1a33bf7f977c04c67f5602e29dc3b031f1693..e0b7978b55174d66acd897ee4cf43290888603d3 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -619,6 +619,7 @@ class MyResearchController extends AbstractBase $tagParser = $this->serviceLocator->get('VuFind\Tags'); $favorites = $this->serviceLocator ->get('VuFind\Favorites\FavoritesService'); + $didSomething = false; foreach ($lists as $list) { $tags = $this->params()->fromPost('tags' . $list); $favorites->save( @@ -629,13 +630,17 @@ class MyResearchController extends AbstractBase ], $user, $driver ); + $didSomething = true; } // add to a new list? $addToList = $this->params()->fromPost('addToList'); if ($addToList > -1) { + $didSomething = true; $favorites->save(['list' => $addToList], $user, $driver); } - $this->flashMessenger()->addMessage('edit_list_success', 'success'); + if ($didSomething) { + $this->flashMessenger()->addMessage('edit_list_success', 'success'); + } $newUrl = null === $listID ? $this->url()->fromRoute('myresearch-favorites')