diff --git a/controllers/grid/catalogEntry/PublicationFormatGridHandler.inc.php b/controllers/grid/catalogEntry/PublicationFormatGridHandler.inc.php index 4c95898eec0..c8c8c2d092a 100644 --- a/controllers/grid/catalogEntry/PublicationFormatGridHandler.inc.php +++ b/controllers/grid/catalogEntry/PublicationFormatGridHandler.inc.php @@ -324,6 +324,8 @@ function deleteFormat($args, $request) { $notificationMgr = new NotificationManager(); $notificationMgr->createTrivialNotification($currentUser->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => __('notification.removedPublicationFormat'))); + $publication = Services::get('publication')->edit($publication, [], $request); + return DAO::getDataChangedEvent(); } @@ -383,6 +385,8 @@ function setApproved($args, $request) { $publicationFormatTombstoneMgr->insertTombstoneByPublicationFormat($representation, $request->getContext()); } + $publication = Services::get('publication')->edit($publication, [], $request); + return DAO::getDataChangedEvent($representation->getId()); } @@ -425,6 +429,8 @@ function setAvailable($args, $request) { $publicationFormatTombstoneMgr->insertTombstoneByPublicationFormat($publicationFormat, $context); } + $publication = Services::get('publication')->edit($publication, [], $request); + return DAO::getDataChangedEvent($publicationFormat->getId()); } diff --git a/controllers/grid/catalogEntry/form/PublicationFormatForm.inc.php b/controllers/grid/catalogEntry/form/PublicationFormatForm.inc.php index 17030b384f0..ad46d8f1a01 100644 --- a/controllers/grid/catalogEntry/form/PublicationFormatForm.inc.php +++ b/controllers/grid/catalogEntry/form/PublicationFormatForm.inc.php @@ -155,8 +155,6 @@ function readInputData() { * @see Form::execute() */ function execute(...$functionParams) { - parent::execute(...$functionParams); - $publicationFormatDao = DAORegistry::getDAO('PublicationFormatDAO'); /* @var $publicationFormatDao PublicationFormatDAO */ $publicationFormat = $this->getPublicationFormat(); if (!$publicationFormat) { @@ -188,8 +186,10 @@ function execute(...$functionParams) { SubmissionLog::logEvent(Application::get()->getRequest(), $this->getMonograph(), SUBMISSION_LOG_PUBLICATION_FORMAT_CREATE, 'submission.event.publicationFormatCreated', array('formatName' => $publicationFormat->getLocalizedName())); } + parent::execute(...$functionParams); + + $publication = Services::get('publication')->edit($publication, [], Application::get()->getRequest()); + return $representationId; } } - - diff --git a/controllers/grid/users/chapter/ChapterGridHandler.inc.php b/controllers/grid/users/chapter/ChapterGridHandler.inc.php index 8097ac269c6..40af8b22c64 100644 --- a/controllers/grid/users/chapter/ChapterGridHandler.inc.php +++ b/controllers/grid/users/chapter/ChapterGridHandler.inc.php @@ -482,6 +482,8 @@ function deleteChapter($args, $request) { $chapterDao = DAORegistry::getDAO('ChapterDAO'); /* @var $chapterDao ChapterDAO */ $chapterDao->deleteById($chapterId); + $publication = $this->getPublication(); + $publication = Services::get('publication')->edit($publication, [], $request); return DAO::getDataChangedEvent(); } @@ -495,5 +497,3 @@ function _getChapterFromRequest($request) { ); } } - - diff --git a/controllers/grid/users/chapter/form/ChapterForm.inc.php b/controllers/grid/users/chapter/form/ChapterForm.inc.php index d262f87e711..afa0da40f8a 100644 --- a/controllers/grid/users/chapter/form/ChapterForm.inc.php +++ b/controllers/grid/users/chapter/form/ChapterForm.inc.php @@ -198,8 +198,6 @@ function readInputData() { * @see Form::execute() */ function execute(...$functionParams) { - parent::execute(...$functionParams); - $chapterDao = DAORegistry::getDAO('ChapterDAO'); /* @var $chapterDao ChapterDAO */ $chapter = $this->getChapter(); $isEdit = !!$chapter; @@ -238,8 +236,10 @@ function execute(...$functionParams) { DAORegistry::getDAO('SubmissionFileDAO')->updateChapterFiles($selectedFiles, $this->getChapter()->getId()); } + parent::execute(...$functionParams); + + $publication = Services::get('publication')->edit($publication, [], Application::get()->getRequest()); + return true; } } - -