@@ -67,6 +67,16 @@ function getData($db) : array
6767 []
6868 );
6969
70+ $ rawProject = $ db ->pselect (
71+ 'SELECT ProjectID, Name FROM Project ' ,
72+ []
73+ );
74+
75+ $ projectOptions = [];
76+ foreach ($ rawProject as $ dataProject ) {
77+ $ projectOptions [$ dataProject ['ProjectID ' ]] = $ dataProject ['Name ' ];
78+ }
79+
7080 // merge variables and test names into one array
7181 $ bvlVOIs = array_merge (
7282 array_column ($ bvlVOIs , 'Name ' ),
@@ -80,11 +90,11 @@ function getData($db) : array
8090
8191 // imaging VoIs -- filter out non-human readable DICOM tags
8292 $ imgVOIs = $ db ->pselectCol (
83- "SELECT DISTINCT p.Name FROM parameter_type p
84- JOIN parameter_type_category_rel ptcr
85- ON p.ParameterTypeID=ptcr.ParameterTypeID
86- JOIN parameter_type_category ptc
87- ON ptc.ParameterTypeCategoryID=ptcr.ParameterTypeCategoryID
93+ "SELECT DISTINCT p.Name FROM parameter_type p
94+ JOIN parameter_type_category_rel ptcr
95+ ON p.ParameterTypeID=ptcr.ParameterTypeID
96+ JOIN parameter_type_category ptc
97+ ON ptc.ParameterTypeCategoryID=ptcr.ParameterTypeCategoryID
8898 WHERE ptc.Name='MRI Variables' " ,
8999 []
90100 );
@@ -114,6 +124,7 @@ function getData($db) : array
114124 );
115125 $ collabs = array_combine ($ collabs , $ collabs );
116126
127+ $ data ['projectOptions ' ] = $ projectOptions ;
117128 $ data ['users ' ] = $ users ;
118129 $ data ['uploadTypes ' ] = getUploadTypes ();
119130 $ data ['existingTitles ' ] = $ titles ;
@@ -134,12 +145,15 @@ function getData($db) : array
134145 */
135146function getProjectData ($ db , $ user , $ id ) : array
136147{
137- $ query = 'SELECT Title, Description, DateProposed, ' .
148+ $ query = 'SELECT Title, Description, pr.Name as project, datePublication, ' .
149+ 'journal, link, publishingStatus, DateProposed, ' .
138150 'pc.Name as LeadInvestigator, pc.Email as LeadInvestigatorEmail, ' .
139151 'PublicationStatusID, UserID, RejectedReason ' .
140152 'FROM publication p ' .
141153 'LEFT JOIN publication_collaborator pc ' .
142154 'ON p.LeadInvestigatorID = pc.PublicationCollaboratorID ' .
155+ 'LEFT JOIN Project pr ' .
156+ 'ON p.project = pr.ProjectID ' .
143157 'WHERE p.PublicationID=:pid ' ;
144158 $ result = $ db ->pselectRow (
145159 $ query ,
@@ -169,13 +183,22 @@ function getProjectData($db, $user, $id) : array
169183
170184 $ usersWithEditPerm = $ userIDs ;
171185
172- $ title = htmlspecialchars_decode ($ result ['Title ' ]);
173- $ description = htmlspecialchars_decode ($ result ['Description ' ]);
174- $ rejectedReason = htmlspecialchars_decode ($ result ['RejectedReason ' ]);
186+ $ title = htmlspecialchars_decode ($ result ['Title ' ]);
187+ $ description = htmlspecialchars_decode ($ result ['Description ' ]);
188+ $ datePublication = htmlspecialchars_decode ($ result ['datePublication ' ]);
189+ $ journal = htmlspecialchars_decode ($ result ['journal ' ]);
190+ $ link = htmlspecialchars_decode ($ result ['link ' ]);
191+ $ publishingStatus = htmlspecialchars_decode ($ result ['publishingStatus ' ]);
192+ $ rejectedReason = htmlspecialchars_decode ($ result ['RejectedReason ' ]);
175193
176194 $ pubData = [
177195 'title ' => $ title ,
178196 'description ' => $ description ,
197+ 'project ' => $ result ['project ' ],
198+ 'datePublication ' => $ datePublication ,
199+ 'journal ' => $ journal ,
200+ 'link ' => $ link ,
201+ 'publishingStatus ' => $ publishingStatus ,
179202 'leadInvestigator ' => $ result ['LeadInvestigator ' ],
180203 'leadInvestigatorEmail ' => $ result ['LeadInvestigatorEmail ' ],
181204 'status ' => $ result ['PublicationStatusID ' ],
0 commit comments