mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
11982: Fix for ETHREEOH-906 - Writing the TICKET value directly to the page during template processing is a potential XSS security hole. 11983: Added back .html suffix to plain HTML form upload api call - added code comment to explain why it's there. 11984: Added debug/info level logging to Invite process. 11985: ETHREEOH-184: thumbnail assocs do not double up on check-in and thumbnail updates are done in one action 11986: Fix for ETHREEOH-905 - missing url encoding step for user password during webscript based login process. 11995: Unit test fixed up, fallout from runAs merge. 11998: Part of a fix for ETHREEOH-546 - Cannot save document to the any space for Microsoft Office 11999: Merged V2.2 to V3.0 11996: Fix for open Lucene ResultSet memory leaks 12000: ETHREEOH-692 - It is impossible to login to Alfresco from Microsoft Office add-in using NTLM authentication. ETHREEOH-546 - Cannot save document to the any space for Microsoft Office. 12001: Paging enabled by default in all Document Libraries git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12494 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -218,17 +218,24 @@ public final class FormsService
|
||||
final ResultSet rs = this.searchService.query(Repository.getStoreRef(),
|
||||
SearchService.LANGUAGE_LUCENE,
|
||||
query);
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("found " + rs.length() + " form definitions");
|
||||
final Collection<Form> result = new ArrayList<Form>(rs.length());
|
||||
for (final ResultSetRow row : rs)
|
||||
try
|
||||
{
|
||||
result.add(this.getForm(row.getNodeRef()));
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("found " + rs.length() + " form definitions");
|
||||
final Collection<Form> result = new ArrayList<Form>(rs.length());
|
||||
for (final ResultSetRow row : rs)
|
||||
{
|
||||
result.add(this.getForm(row.getNodeRef()));
|
||||
}
|
||||
QuickSort sorter = new QuickSort((List)result, "name", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
rs.close();
|
||||
}
|
||||
QuickSort sorter = new QuickSort((List)result, "name", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -400,15 +407,22 @@ public final class FormsService
|
||||
final ResultSet rs = this.searchService.query(Repository.getStoreRef(),
|
||||
SearchService.LANGUAGE_LUCENE,
|
||||
query);
|
||||
if (LOGGER.isDebugEnabled())
|
||||
try
|
||||
{
|
||||
LOGGER.debug("query " + query + " returned " + rs.length() + " results");
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
LOGGER.debug("query " + query + " returned " + rs.length() + " results");
|
||||
}
|
||||
final List<NodeRef> result = new ArrayList<NodeRef>(rs.length());
|
||||
for (final ResultSetRow row : rs)
|
||||
{
|
||||
result.add(row.getNodeRef());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
final List<NodeRef> result = new ArrayList<NodeRef>(rs.length());
|
||||
for (final ResultSetRow row : rs)
|
||||
finally
|
||||
{
|
||||
result.add(row.getNodeRef());
|
||||
rs.close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@@ -145,18 +145,25 @@ public class Schema2XFormsProperties
|
||||
searchService.query(Repository.getStoreRef(),
|
||||
SearchService.LANGUAGE_LUCENE,
|
||||
"PATH:\"" + name + "\"");
|
||||
LOGGER.debug("search returned " + results.length() +
|
||||
" results");
|
||||
if (results.length() == 1)
|
||||
try
|
||||
{
|
||||
final NodeRef nr = results.getNodeRef(0);
|
||||
final ContentReader reader =
|
||||
contentService.getReader(nr, ContentModel.PROP_CONTENT);
|
||||
return reader.getContentInputStream();
|
||||
LOGGER.debug("search returned " + results.length() +
|
||||
" results");
|
||||
if (results.length() == 1)
|
||||
{
|
||||
final NodeRef nr = results.getNodeRef(0);
|
||||
final ContentReader reader =
|
||||
contentService.getReader(nr, ContentModel.PROP_CONTENT);
|
||||
return reader.getContentInputStream();
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.getResourceAsStream(name);
|
||||
}
|
||||
}
|
||||
else
|
||||
finally
|
||||
{
|
||||
return super.getResourceAsStream(name);
|
||||
results.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user