Merged V4.1-BUg-FIX (4.1.4) to HEAD (4.2)

47218: ALF-15526 (Incorrect behaviour on filtering by tag)
   47220: ALF-17174 pdf2swf supports converting N first pages but alfresco does not support it via the pageLimit
      - Possible unit test fix. Not sure why the test fail given they don't when the same command is run on the build m/c
        from the command line.
      - Changed the command so that the new -p parameter is not there is there are no page restrictions and moved
        it to before the source file.
   47241: Calendar tagging bug fixes:
      - Fixes ALF-10533 - Tags don't reload after event create/edit
      - Merges & modifies fix for ALF-16998
      - clean up of unused code and comments.
   47243: Fix for ALF-18194 - Bad performance with multiple contentstores browsing files on the slower store
    - removed the need to acquire an InputStream for the content just to avoid thumbnail generation for the edge case of nodes with missing content...
   Also fixed issue with display of content size for nodes with missing content - now displays "0 bytes" rather than "NaN GB"
   47248: V4.1-BUG-FIX (4.1.4)
      - Use "-p 0-" rather than "-p ''"
      - Reverse Merge the previous attrempt. On Linux this resulted in an extra argument to the command. Was not a problem on Windows.
        47220: ALF-17174 pdf2swf supports converting N first pages but alfresco does not support it via the pageLimit
           - Possible unit test fix. Not sure why the test fail given they don't when the same command is run on the build m/c
             from the command line.
           - Changed the command so that the new -p parameter is not there is there are no page restrictions and moved
             it to before the source file.
   47251: Fix for ALF-17395 - server error if session expires when a tenant is logged into Share


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47255 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2013-02-27 21:22:13 +00:00
parent 57a5da2551
commit ca526c488e
7 changed files with 33 additions and 96 deletions

View File

@@ -24,7 +24,7 @@
}, },
"uri" : "${result.uri}", "uri" : "${result.uri}",
"allday" : "${result.allday?string}", "allday" : "${result.allday?string}",
"tags" : "${result.tags}", "tags" : [<#list result.tags as tag>"${tag}"<#if tag_has_next>,</#if></#list>,
"docfolder": "${result.docfolder}" "docfolder": "${result.docfolder}"
} }

View File

@@ -266,11 +266,8 @@ function doclist_main()
// Resolved location // Resolved location
item.location = location; item.location = location;
// Check: thumbnail type is registered && node is a cm:content subtype && valid inputStream for content property // Check: thumbnail type is registered && node is a cm:content subtype
var is = item.node.properties.content.inputStream; if (isThumbnailNameRegistered && item.node.isSubType("cm:content"))
try
{
if (isThumbnailNameRegistered && item.node.isSubType("cm:content") && (null != is))
{ {
// Make sure we have a thumbnail. // Make sure we have a thumbnail.
thumbnail = item.node.getThumbnail(THUMBNAIL_NAME); thumbnail = item.node.getThumbnail(THUMBNAIL_NAME);
@@ -280,14 +277,6 @@ function doclist_main()
item.node.createThumbnail(THUMBNAIL_NAME, true); item.node.createThumbnail(THUMBNAIL_NAME, true);
} }
} }
}
finally
{
if (null != is)
{
is.close();
}
}
items.push(item); items.push(item);
} }

View File

@@ -50,11 +50,8 @@ function getDoclist()
item.location.file = ""; item.location.file = "";
} }
// Check: thumbnail type is registered && node is a cm:content subtype && valid inputStream for content property // Check: thumbnail type is registered && node is a cm:content subtype
var is = item.node.properties.content.inputStream; if (isThumbnailNameRegistered && item.node.isSubType("cm:content"))
try
{
if (isThumbnailNameRegistered && item.node.isSubType("cm:content") && (null != is))
{ {
// Make sure we have a thumbnail. // Make sure we have a thumbnail.
thumbnail = item.node.getThumbnail(THUMBNAIL_NAME); thumbnail = item.node.getThumbnail(THUMBNAIL_NAME);
@@ -64,14 +61,6 @@ function getDoclist()
item.node.createThumbnail(THUMBNAIL_NAME, true); item.node.createThumbnail(THUMBNAIL_NAME, true);
} }
} }
}
finally
{
if (null != is)
{
is.close();
}
}
return ( return (
{ {

View File

@@ -225,11 +225,8 @@ function getDoclist()
// Resolved location // Resolved location
item.location = location; item.location = location;
// Is our thumbnail type registered? // Check: thumbnail type is registered && node is a cm:content subtype
var is = item.node.properties.content.inputStream; if (isThumbnailNameRegistered && item.node.isSubType("cm:content"))
try
{
if (isThumbnailNameRegistered && item.node.isSubType("cm:content") && (null != is))
{ {
// Make sure we have a thumbnail. // Make sure we have a thumbnail.
thumbnail = item.node.getThumbnail(THUMBNAIL_NAME); thumbnail = item.node.getThumbnail(THUMBNAIL_NAME);
@@ -239,14 +236,6 @@ function getDoclist()
item.node.createThumbnail(THUMBNAIL_NAME, true); item.node.createThumbnail(THUMBNAIL_NAME, true);
} }
} }
}
finally
{
if (null != is)
{
is.close();
}
}
items.push(item); items.push(item);
} }

View File

@@ -60,11 +60,8 @@ function getDoclist()
item.location.file = ""; item.location.file = "";
} }
// Is our thumbnail type registered? // Check: thumbnail type is registered && node is a cm:content subtype
var is = item.node.properties.content.inputStream; if (isThumbnailNameRegistered && item.node.isSubType("cm:content"))
try
{
if (isThumbnailNameRegistered && item.node.isSubType("cm:content") && (null != is))
{ {
// Make sure we have a thumbnail. // Make sure we have a thumbnail.
thumbnail = item.node.getThumbnail(THUMBNAIL_NAME); thumbnail = item.node.getThumbnail(THUMBNAIL_NAME);
@@ -74,14 +71,6 @@ function getDoclist()
item.node.createThumbnail(THUMBNAIL_NAME, true); item.node.createThumbnail(THUMBNAIL_NAME, true);
} }
} }
}
finally
{
if (null != is)
{
is.close();
}
}
return ( return (
{ {

View File

@@ -65,7 +65,7 @@ public class CalendarEntryPost extends AbstractCalendarWebScript
// Handle tags // Handle tags
if (json.containsKey("tags")) if (json.containsKey("tags"))
{ {
StringTokenizer st = new StringTokenizer((String)json.get("tags"), " "); StringTokenizer st = new StringTokenizer((String)json.get("tags"), ",");
while (st.hasMoreTokens()) while (st.hasMoreTokens())
{ {
entry.getTags().add(st.nextToken()); entry.getTags().add(st.nextToken());

View File

@@ -133,7 +133,7 @@ public class CalendarEntryPut extends AbstractCalendarWebScript
{ {
entry.getTags().clear(); entry.getTags().clear();
StringTokenizer st = new StringTokenizer((String)json.get("tags"), " "); StringTokenizer st = new StringTokenizer((String)json.get("tags"), ",");
while (st.hasMoreTokens()) while (st.hasMoreTokens())
{ {
entry.getTags().add(st.nextToken()); entry.getTags().add(st.nextToken());
@@ -173,7 +173,7 @@ public class CalendarEntryPut extends AbstractCalendarWebScript
result.put("uri", "calendar/event/" + site.getShortName() + "/" + result.put("uri", "calendar/event/" + site.getShortName() + "/" +
entry.getSystemName() + dateOpt); entry.getSystemName() + dateOpt);
result.put("tags", generateTagString(entry)); result.put("tags", entry.getTags());
result.put("allday", isAllDay); result.put("allday", isAllDay);
result.put("docfolder", entry.getSharePointDocFolder()); result.put("docfolder", entry.getSharePointDocFolder());
@@ -191,23 +191,4 @@ public class CalendarEntryPut extends AbstractCalendarWebScript
model.put("result", result); model.put("result", result);
return model; return model;
} }
/**
* We use lists for tags internally, and the other webscripts
* return arrays too. This one is different, and it needs to
* a single space separated string. This does the conversion
*/
protected String generateTagString(CalendarEntry entry)
{
StringBuffer sb = new StringBuffer();
if (entry.getTags() != null)
{
for (String tag : entry.getTags())
{
if (sb.length() > 0) sb.append(' ');
sb.append(tag);
}
}
return sb.toString();
}
} }