Skip to content

Commit

Permalink
pkp#10019 Fix publication update when modifying contributor
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Jun 19, 2024
1 parent 2a9a541 commit d903b2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions controllers/grid/users/author/AuthorGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use APP\core\Application;
use APP\facades\Repo;
use APP\notification\NotificationManager;
use APP\publication\Publication;
use PKP\controllers\grid\feature\OrderGridItemsFeature;
use PKP\controllers\grid\GridColumn;
use PKP\controllers\grid\GridHandler;
Expand Down Expand Up @@ -444,6 +445,8 @@ public function deleteAuthor($args, $request)

$json = \PKP\db\DAO::getDataChangedEvent($authorId);
$json->setGlobalEvent('authorsUpdated');
$publication = $this->getPublication(); /** @var Publication $publication */
$publication = Repo::publication()->edit($publication, []);
return $json;
}

Expand Down
4 changes: 3 additions & 1 deletion controllers/grid/users/author/form/PKPAuthorForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,10 @@ public function execute(...$functionParams)
throw new Exception('Invalid primary contact ID. This author can not be a primary contact.');
}
Repo::publication()->edit($publication, $params);
} else {
// Log an event when publication data is updated
$publication = Repo::publication()->edit($publication, []);
}

return $authorId;
}
}

0 comments on commit d903b2e

Please sign in to comment.