diff --git a/modules/publication/ajax/FileUpload.php b/modules/publication/ajax/FileUpload.php index 3fde3ecb401..c562cf8774e 100644 --- a/modules/publication/ajax/FileUpload.php +++ b/modules/publication/ajax/FileUpload.php @@ -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 diff --git a/modules/publication/ajax/getData.php b/modules/publication/ajax/getData.php index 9793d5ca0da..c7336832383 100644 --- a/modules/publication/ajax/getData.php +++ b/modules/publication/ajax/getData.php @@ -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 '. @@ -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,