Skip to content

Commit

Permalink
pkp/pkp-lib#3944 Set JSON content types
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Sep 6, 2018
1 parent 5ac14ed commit 78dadee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controllers/grid/CustomBlockGridHandler.inc.php
Expand Up @@ -137,8 +137,7 @@ function editCustomBlock($args, $request) {
$template = $customBlockManagerPlugin->getTemplatePath() . 'editCustomBlockForm.tpl';
$customBlockForm = new CustomBlockForm($template, $contextId, $customBlockPlugin);
$customBlockForm->initData();
$json = new JSONMessage(true, $customBlockForm->fetch($request));
return $json->getString();
return new JSONMessage(true, $customBlockForm->fetch($request));
}

/**
Expand Down Expand Up @@ -175,8 +174,7 @@ function updateCustomBlock($args, $request) {
return DAO::getDataChangedEvent();
} else {
// Present any errors
$json = new JSONMessage(true, $customBlockForm->fetch($request));
return $json->getString();
return new JSONMessage(true, $customBlockForm->fetch($request));
}
}

Expand Down

0 comments on commit 78dadee

Please sign in to comment.