ALF-9156 Tweak calendar webscripts

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29043 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2011-07-14 15:42:06 +00:00
parent 70669e3136
commit 44dbe4a189
2 changed files with 7 additions and 2 deletions

View File

@@ -262,7 +262,12 @@ public abstract class AbstractCalendarWebScript extends DeclarativeWebScript
// Parse the JSON, if supplied
JSONObject json = null;
if(MimetypeMap.MIMETYPE_JSON.equals( req.getContentType() ))
String contentType = req.getContentType();
if(contentType != null && contentType.indexOf(';') != -1)
{
contentType = contentType.substring(0, contentType.indexOf(';'));
}
if(MimetypeMap.MIMETYPE_JSON.equals(contentType))
{
try
{

View File

@@ -54,7 +54,7 @@ public class UserCalendarEntriesGet extends AbstractCalendarWebScript
// Site is optional
SiteInfo site = null;
String siteName = templateVars.get("siteid");
String siteName = templateVars.get("site");
if(siteName != null)
{
site = siteService.getSite(siteName);