mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
ALF-8671 When listing Blogs/Lists/Discussions, the tag filter string is encoded before sending, so must be decoded in the webscript before searching. (Plus blog tagging test enhancements)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32146 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -35,9 +35,11 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
|||||||
import org.alfresco.service.cmr.site.SiteInfo;
|
import org.alfresco.service.cmr.site.SiteInfo;
|
||||||
import org.alfresco.util.Pair;
|
import org.alfresco.util.Pair;
|
||||||
import org.alfresco.util.ScriptPagingDetails;
|
import org.alfresco.util.ScriptPagingDetails;
|
||||||
|
import org.alfresco.util.UrlUtil;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
import org.springframework.extensions.surf.util.URLDecoder;
|
||||||
import org.springframework.extensions.webscripts.Cache;
|
import org.springframework.extensions.webscripts.Cache;
|
||||||
import org.springframework.extensions.webscripts.Status;
|
import org.springframework.extensions.webscripts.Status;
|
||||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||||
@@ -65,7 +67,15 @@ public abstract class AbstractGetBlogWebScript extends AbstractBlogWebScript
|
|||||||
Date toDate = parseDateParam(req, "toDate");
|
Date toDate = parseDateParam(req, "toDate");
|
||||||
|
|
||||||
String tag = req.getParameter("tag");
|
String tag = req.getParameter("tag");
|
||||||
if (tag != null && tag.length() == 0) tag = null;
|
if (tag == null || tag.length() == 0)
|
||||||
|
{
|
||||||
|
tag = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Tags can be full unicode strings, so decode
|
||||||
|
tag = URLDecoder.decode(tag);
|
||||||
|
}
|
||||||
|
|
||||||
// One webscript (blog-posts-new.get) uses a 'numdays' parameter as a 'fromDate'.
|
// One webscript (blog-posts-new.get) uses a 'numdays' parameter as a 'fromDate'.
|
||||||
// This is a hacky solution to this special case. FIXME
|
// This is a hacky solution to this special case. FIXME
|
||||||
|
@@ -27,6 +27,7 @@ import org.alfresco.service.cmr.discussion.TopicInfo;
|
|||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.site.SiteInfo;
|
import org.alfresco.service.cmr.site.SiteInfo;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
import org.springframework.extensions.surf.util.URLDecoder;
|
||||||
import org.springframework.extensions.webscripts.Cache;
|
import org.springframework.extensions.webscripts.Cache;
|
||||||
import org.springframework.extensions.webscripts.Status;
|
import org.springframework.extensions.webscripts.Status;
|
||||||
import org.springframework.extensions.webscripts.WebScriptException;
|
import org.springframework.extensions.webscripts.WebScriptException;
|
||||||
@@ -58,6 +59,9 @@ public class ForumTopicsGet extends AbstractDiscussionWebScript
|
|||||||
if (tag != null && tag.length() > 0)
|
if (tag != null && tag.length() > 0)
|
||||||
{
|
{
|
||||||
tagSearch = true;
|
tagSearch = true;
|
||||||
|
|
||||||
|
// Tags can be full unicode strings, so decode
|
||||||
|
tag = URLDecoder.decode(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the topics
|
// Get the topics
|
||||||
|
@@ -32,6 +32,7 @@ import org.alfresco.service.cmr.links.LinkInfo;
|
|||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.site.SiteInfo;
|
import org.alfresco.service.cmr.site.SiteInfo;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
import org.springframework.extensions.surf.util.URLDecoder;
|
||||||
import org.springframework.extensions.webscripts.Cache;
|
import org.springframework.extensions.webscripts.Cache;
|
||||||
import org.springframework.extensions.webscripts.Status;
|
import org.springframework.extensions.webscripts.Status;
|
||||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||||
@@ -61,6 +62,11 @@ public class LinksListGet extends AbstractLinksWebScript
|
|||||||
{
|
{
|
||||||
tagFiltering = false;
|
tagFiltering = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Tags can be full unicode strings, so decode
|
||||||
|
tag = URLDecoder.decode(tag);
|
||||||
|
}
|
||||||
|
|
||||||
// User?
|
// User?
|
||||||
boolean userFiltering = false;
|
boolean userFiltering = false;
|
||||||
|
Reference in New Issue
Block a user