Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-p-s committed Mar 10, 2021
1 parent 42931fe commit 649300f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions modules/publication/ajax/FileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ function uploadPublication() : void
showPublicationError('Submitted title already exists', 400);
}
$desc = $_POST['description'] ?? null;
$datePublication = $_POST['datePublication'] ?? NULL;
$journal = $_POST['journal'] ?? NULL;
$link = $_POST['link'] ?? NULL;
$publishingStatus= $_POST['publishingStatus'] ?? NULL;
$leadInvest = $_POST['leadInvestigator'] ?? null;
$leadInvestEmail = $_POST['leadInvestigatorEmail'] ?? null;
$datePublication = $_POST['datePublication'] ?? null;
$journal = $_POST['journal'] ?? null;
$link = $_POST['link'] ?? null;
$publishingStatus = $_POST['publishingStatus'] ?? null;
$leadInvest = $_POST['leadInvestigator'] ?? null;
$leadInvestEmail = $_POST['leadInvestigatorEmail'] ?? null;

// check if lead investigator already exists in collaborator table
// use ID if exists, else insert
Expand Down
11 changes: 6 additions & 5 deletions modules/publication/ajax/getData.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ function getData($db) : array
*/
function getProjectData($db, $user, $id) : array
{
$query = 'SELECT Title, Description, datePublication, journal, link, publishingStatus, DateProposed, '.
$query = 'SELECT Title, Description, datePublication, journal, '.
'link, publishingStatus, DateProposed, '.
'pc.Name as LeadInvestigator, pc.Email as LeadInvestigatorEmail, '.
'PublicationStatusID, UserID, RejectedReason '.
'FROM publication p '.
Expand Down Expand Up @@ -166,13 +167,13 @@ function getProjectData($db, $user, $id) : array

$usersWithEditPerm = $userIDs;

$title = htmlspecialchars_decode($result['Title']);
$description = htmlspecialchars_decode($result['Description']);
$title = htmlspecialchars_decode($result['Title']);
$description = htmlspecialchars_decode($result['Description']);
$datePublication = htmlspecialchars_decode($result['datePublication']);
$journal = htmlspecialchars_decode($result['journal']);
$link = htmlspecialchars_decode($result['link']);
$publishingStatus= htmlspecialchars_decode($result['publishingStatus']);
$rejectedReason = htmlspecialchars_decode($result['RejectedReason']);
$publishingStatus = htmlspecialchars_decode($result['publishingStatus']);
$rejectedReason = htmlspecialchars_decode($result['RejectedReason']);

$pubData = array(
'title' => $title,
Expand Down

0 comments on commit 649300f

Please sign in to comment.