From 92d9cfd647d8fa070a71e8d350cd31b465186f24 Mon Sep 17 00:00:00 2001 From: Salman Murad Date: Tue, 18 Jun 2024 18:48:51 -0600 Subject: [PATCH] #10019 Fix publication update when modifying contributor --- controllers/grid/users/author/AuthorGridHandler.inc.php | 2 ++ controllers/grid/users/author/form/PKPAuthorForm.inc.php | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/controllers/grid/users/author/AuthorGridHandler.inc.php b/controllers/grid/users/author/AuthorGridHandler.inc.php index 1df0806c8e4..bfe928f2d87 100644 --- a/controllers/grid/users/author/AuthorGridHandler.inc.php +++ b/controllers/grid/users/author/AuthorGridHandler.inc.php @@ -393,6 +393,8 @@ function deleteAuthor($args, $request) { $authorDao->deleteById($authorId); $json = DAO::getDataChangedEvent($authorId); $json->setGlobalEvent('authorsUpdated'); + $publication = $this->getPublication(); + $publication = Services::get('publication')->edit($publication, [], Application::get()->getRequest()); return $json; } diff --git a/controllers/grid/users/author/form/PKPAuthorForm.inc.php b/controllers/grid/users/author/form/PKPAuthorForm.inc.php index c077a01b072..ae2d082368a 100644 --- a/controllers/grid/users/author/form/PKPAuthorForm.inc.php +++ b/controllers/grid/users/author/form/PKPAuthorForm.inc.php @@ -256,9 +256,6 @@ function execute(...$functionParams) { throw new Exception('Invalid primary contact ID. This author can not be a primary contact.'); } $publication = Services::get('publication')->edit($publication, $params, Application::get()->getRequest()); - } else { - // Log an event when publication data is updated - $publication = Services::get('publication')->edit($publication, [], Application::get()->getRequest()); } return $authorId;