Skip to content

Commit 28142df

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fb_sourceDIB
2 parents a35f233 + 8cb8ba7 commit 28142df

119 files changed

Lines changed: 3708 additions & 1756 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<!-- list of standard tasks (remove this comment to enable)
1111
#### Tasks 📍
1212
- [ ] Manual Testing
13-
- [ ] Needs Automation
13+
- [ ] Test Automation
1414
- [ ] Verify Fix
15-
-->
15+
-->

announcements/src/org/labkey/announcements/announcementThread.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ if (!announcementModel.getAttachments().isEmpty())
127127
{
128128
ActionURL downloadURL = AnnouncementsController.getDownloadURL(announcementModel, d.getName());
129129
%>
130-
<a href="<%=h(downloadURL)%>"><img alt="" src="<%=getWebappURL(d.getFileIcon())%>">&nbsp;<%=h(d.getName())%></a>&nbsp;<%
130+
<%=d.renderDownloadLink(downloadURL)%>&nbsp;<%
131131
} %>
132132
</div></td>
133133
</tr><%
@@ -210,7 +210,7 @@ if (!announcementModel.getResponses().isEmpty())
210210
{
211211
ActionURL downloadURL = AnnouncementsController.getDownloadURL(r, rd.getName());
212212
%>
213-
<a href="<%=h(downloadURL)%>"><img alt="" src="<%=getWebappURL(rd.getFileIcon())%>">&nbsp;<%=h(rd.getName())%></a>&nbsp;<%
213+
<%=rd.renderDownloadLink(downloadURL)%>&nbsp;<%
214214
}
215215
%>
216216
</div></td>

announcements/src/org/labkey/announcements/announcementWebPartSimple.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ for (AnnouncementModel a : bean.announcementModels)
195195
for (Attachment d : a.getAttachments())
196196
{
197197
ActionURL downloadURL = AnnouncementsController.getDownloadURL(a, d.getName());
198-
%><a href="<%=h(downloadURL)%>"><img src="<%=getWebappURL(d.getFileIcon())%>">&nbsp;<%=h(d.getName())%></a>&nbsp;<%
198+
%><%=d.renderDownloadLink(downloadURL)%>&nbsp;<%
199199
}
200200
%></td></tr><%
201201
}

announcements/src/org/labkey/announcements/announcementWebPartWithExpandos.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ for (AnnouncementModel a : bean.announcementModels)
217217
for (Attachment d : a.getAttachments())
218218
{
219219
ActionURL downloadURL = AnnouncementsController.getDownloadURL(a, d.getName());
220-
%><a href="<%=h(downloadURL)%>"><img src="<%=getWebappURL(d.getFileIcon())%>">&nbsp;<%=h(d.getName())%></a>&nbsp;<%
220+
%><%=d.renderDownloadLink(downloadURL)%>&nbsp;<%
221221
}
222222
%></td></tr><%
223223
}

announcements/src/org/labkey/announcements/update.jsp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ if (settings.hasExpires())
140140
<tbody>
141141
<%
142142
int x = -1;
143-
String id;
144143
for (Attachment att : ann.getAttachments())
145144
{
146145
x++;

api/build.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,32 @@ dependencies {
381381
)
382382
)
383383

384+
BuildUtils.addExternalDependency(
385+
project,
386+
new ExternalDependency(
387+
"org.graphper:graph-support-core:${graphSupportVersion}",
388+
"graph-support-core",
389+
"graph-support",
390+
"https://github.com/jamisonjiang/graph-support",
391+
ExternalDependency.APACHE_2_LICENSE_NAME,
392+
ExternalDependency.APACHE_2_LICENSE_URL,
393+
"Graphviz Java API",
394+
)
395+
)
396+
397+
BuildUtils.addExternalDependency(
398+
project,
399+
new ExternalDependency(
400+
"org.graphper:graph-support-dot:${graphSupportVersion}",
401+
"graph-support-dot",
402+
"graph-support",
403+
"https://github.com/jamisonjiang/graph-support",
404+
ExternalDependency.APACHE_2_LICENSE_NAME,
405+
ExternalDependency.APACHE_2_LICENSE_URL,
406+
"DOT parsing support",
407+
)
408+
)
409+
384410
BuildUtils.addExternalDependency(
385411
project,
386412
new ExternalDependency(

api/src/org/labkey/api/ApiModule.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.labkey.api.collections.CaseInsensitiveHashSet;
3939
import org.labkey.api.collections.CaseInsensitiveMapWrapper;
4040
import org.labkey.api.collections.CollectionUtils;
41+
import org.labkey.api.collections.DeltaTrackingMap;
4142
import org.labkey.api.collections.LabKeyCollectors;
4243
import org.labkey.api.collections.Sampler;
4344
import org.labkey.api.collections.SwapQueue;
@@ -172,6 +173,7 @@
172173
import org.labkey.api.util.SessionHelper;
173174
import org.labkey.api.util.StringExpressionFactory;
174175
import org.labkey.api.util.StringUtilsLabKey;
176+
import org.labkey.api.util.SvgUtil;
175177
import org.labkey.api.util.SystemMaintenance;
176178
import org.labkey.api.util.SystemMaintenanceStartupListener;
177179
import org.labkey.api.util.URIUtil;
@@ -384,6 +386,7 @@ public void registerServlets(ServletContext servletCtx)
384386
DatabaseCache.TestCase.class,
385387
DateUtil.TestCase.class,
386388
DbScope.DialectTestCase.class,
389+
DeltaTrackingMap.TestCase.class,
387390
DetailsURL.TestCase.class,
388391
DiskCachingDataIterator.DiskTestCase.class,
389392
EmailTemplate.TestCase.class,
@@ -439,6 +442,7 @@ public void registerServlets(ServletContext servletCtx)
439442
StringExpressionFactory.TestCase.class,
440443
StringUtilsLabKey.TestCase.class,
441444
SubfolderWriter.TestCase.class,
445+
SvgUtil.TestCase.class,
442446
SwapQueue.TestCase.class,
443447
TSVMapWriter.Tests.class,
444448
TSVWriter.TestCase.class,

api/src/org/labkey/api/action/SpringActionController.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ public static Collection<ActionDescriptor> getRegisteredActionDescriptors()
175175
return new ArrayList<>(_classToDescriptor.values());
176176
}
177177

178+
protected static String h(@Nullable CharSequence s)
179+
{
180+
return PageFlowUtil.filter(s);
181+
}
182+
183+
protected static String h(@Nullable Object o)
184+
{
185+
return PageFlowUtil.filter(o);
186+
}
187+
178188
// I don't think there is an interface for this
179189
public interface ActionResolver
180190
{

api/src/org/labkey/api/admin/FolderImportContext.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040

4141
import static org.labkey.api.exp.XarContext.XAR_JOB_ID_NAME;
4242

43-
/**
44-
* User: cnathe
45-
* Date: Jan 18, 2012
46-
*/
4743
public class FolderImportContext extends AbstractFolderContext
4844
{
4945
private FileLike _folderXml;
@@ -57,8 +53,6 @@ public class FolderImportContext extends AbstractFolderContext
5753

5854
private boolean _isNewFolderImport; // if we know the target folder is empty, can skip certain merge logic
5955

60-
public static final String IS_NEW_FOLDER_IMPORT_KEY = "isNewFolderImport";
61-
6256
/** Required for xstream serialization on Java 7 */
6357
@SuppressWarnings({"UnusedDeclaration"})
6458
public FolderImportContext()

api/src/org/labkey/api/assay/AbstractAssayProvider.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
import javax.script.ScriptEngine;
125125
import java.io.File;
126126
import java.io.IOException;
127+
import java.io.InputStream;
127128
import java.net.URI;
128129
import java.net.URL;
129130
import java.sql.ResultSet;
@@ -1274,9 +1275,9 @@ public Pair<ValidationException, Pair<String, String>> setValidationAndAnalysisS
12741275
if (!(engine instanceof ExternalScriptEngine && ((ExternalScriptEngine) engine).isBinary(scriptFile)))
12751276
{
12761277
String scriptText;
1277-
try
1278+
try (InputStream is = scriptFile.openInputStream())
12781279
{
1279-
scriptText = IOUtils.toString(scriptFile.openInputStream(), StringUtilsLabKey.DEFAULT_CHARSET);
1280+
scriptText = IOUtils.toString(is, StringUtilsLabKey.DEFAULT_CHARSET);
12801281
}
12811282
catch (IOException e)
12821283
{

0 commit comments

Comments
 (0)