Revision 57497
Added by Konstantina Galouni over 4 years ago
PageHelpContentController.java | ||
---|---|---|
124 | 124 |
|
125 | 125 |
@RequestMapping(value = "/pagehelpcontent/save", method = RequestMethod.POST) |
126 | 126 |
public PageHelpContent insertPageHelpContent(@RequestBody PageHelpContent pageHelpContent) { |
127 |
//String communityId = communityController.getCommunity(pageHelpContent.getCommunity()).getId();
|
|
128 |
pageHelpContent.setCommunity(pageHelpContent.getCommunity());
|
|
127 |
String communityId = communityController.getCommunity(pageHelpContent.getCommunity()).getId(); |
|
128 |
pageHelpContent.setCommunity(communityId);
|
|
129 | 129 |
return pageHelpContentDAO.save(pageHelpContent); |
130 | 130 |
} |
131 | 131 |
|
... | ... | |
168 | 168 |
String organizations_page_content = "<div> <p>Here you can write more details about the organizations related to your community.</p> </div>"; |
169 | 169 |
Page organizationsPage = (pageController.getAllPages(null, "/organizations", null)).get(0); |
170 | 170 |
|
171 |
PageHelpContent organizations_pageHelpContent = new PageHelpContent(organizationsPage.getId(), communityId, "top", 1, organizations_page_content, false, false);
|
|
171 |
PageHelpContent organizations_pageHelpContent = new PageHelpContent(organizationsPage.getId(), pid, "top", 1, organizations_page_content, false, false);
|
|
172 | 172 |
this.insertPageHelpContent(organizations_pageHelpContent); |
173 | 173 |
|
174 | 174 |
String depositLearnHow_page_content = "" + |
... | ... | |
183 | 183 |
"</div>"; |
184 | 184 |
Page depositLearnHowPage = (pageController.getAllPages(null, "/participate/deposit/learn-how", null)).get(0); |
185 | 185 |
|
186 |
PageHelpContent depositLearnHow_pageHelpContent = new PageHelpContent(depositLearnHowPage.getId(), communityId, "bottom", 1, depositLearnHow_page_content, true, false);
|
|
186 |
PageHelpContent depositLearnHow_pageHelpContent = new PageHelpContent(depositLearnHowPage.getId(), pid, "bottom", 1, depositLearnHow_page_content, true, false);
|
|
187 | 187 |
this.insertPageHelpContent(depositLearnHow_pageHelpContent); |
188 | 188 |
} |
189 | 189 |
} |
Also available in: Unified diff
1. bug_fix_db.js: New script to remove leaks (statistics and community subscribers) from db for 2 deleted communities.
2. CommunityController.java: When updating a community, update 'pid' field in statistics and community subscribers related to this community.
3. PageHelpContentController.java: Revert previous commit - in function 'insertPageHelpContent()' always give pagehelpcontent parameter with community pid and replace it with id there.