Skip to content

Commit

Permalink
Call form execute hook after object update
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagolepidus committed Sep 3, 2024
1 parent a45c2fa commit 606d7ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -188,6 +186,8 @@ 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;
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/users/chapter/form/ChapterForm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -238,6 +236,8 @@ 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;
Expand Down

0 comments on commit 606d7ea

Please sign in to comment.