partially fixed bug for mention link backward compatibility
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@130439 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b05a56db80
commit
ac207b4ada
|
@ -841,10 +841,18 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
||||||
ASLSession session = getASLSession();
|
ASLSession session = getASLSession();
|
||||||
String username = session.getUsername();
|
String username = session.getUsername();
|
||||||
|
|
||||||
|
|
||||||
|
//patch needed for maintaining mention link backward compatibility (they point to /group/data-e-infrastructure-gateway/profile)
|
||||||
|
final String LINK_TO_REPLACE = "data-e-infrastructure-gateway";
|
||||||
|
String siteLandinPagePath = PortalContext.getConfiguration().getSiteLandingPagePath(getThreadLocalRequest());
|
||||||
|
String tokenTosubstitute = siteLandinPagePath.replace("/group/", "");
|
||||||
|
|
||||||
ArrayList<String> likedFeeds = (ArrayList<String>) store.getAllLikedFeedIdsByUser(getASLSession().getUsername());
|
ArrayList<String> likedFeeds = (ArrayList<String>) store.getAllLikedFeedIdsByUser(getASLSession().getUsername());
|
||||||
boolean skip = false;
|
boolean skip = false;
|
||||||
for (Feed feed : toEnhance) {
|
for (Feed feed : toEnhance) {
|
||||||
|
//patch needed for maintaining mention link backward compatibility (they point to /group/data-e-infrastructure-gateway/profile)
|
||||||
|
String currPostText = feed.getDescription().replace(LINK_TO_REPLACE,tokenTosubstitute);
|
||||||
|
feed.setDescription(currPostText);
|
||||||
boolean isMultiFileUpload = feed.isMultiFileUpload();
|
boolean isMultiFileUpload = feed.isMultiFileUpload();
|
||||||
ArrayList<Attachment> attachments = new ArrayList<Attachment>();
|
ArrayList<Attachment> attachments = new ArrayList<Attachment>();
|
||||||
if (isMultiFileUpload) {
|
if (isMultiFileUpload) {
|
||||||
|
|
Loading…
Reference in New Issue