[Trunk | Admin Tools]: update_db.js: [Bug fix] Add Home page of communities by updating "portal" collection (not "community) | call "addHomePageInCommunities()" independently (not from other function).
This commit is contained in:
parent
c40385090c
commit
6f16710191
|
@ -1734,7 +1734,6 @@ function addFooterDivIdForConnect() {
|
|||
function addFooterDivIdForCommunities() {
|
||||
// db.page.save({ "route" : "/", "name" : "Home", "type" : "other", "entities" : [ ], "portalType" : "community", "top" : false, "bottom" : false, "left" : false, "right" : false });
|
||||
// print("page 'Home' added for communities");
|
||||
addHomePageInCommunities();
|
||||
|
||||
communityHomePageID = db.page.find({"portalType": "community", "route": "/"}).map( function(community) { return community._id.str; } ).toString();
|
||||
db.divId.save({ "name" : "footer", "pages" : [ communityHomePageID ], "portalType" : "community" });
|
||||
|
@ -1751,7 +1750,7 @@ function addHomePageInCommunities() {
|
|||
community_pages[communityHomePageID] = true;
|
||||
|
||||
community_pid = communities[i].pid;
|
||||
db.community.update({ "pid" : community_pid },{$set: { "pages": community_pages}});
|
||||
db.portal.update({ "pid" : community_pid },{$set: { "pages": community_pages}});
|
||||
print("Add home page with id " + communityHomePageID + " on community " + community_pid);
|
||||
}
|
||||
}
|
||||
|
@ -1913,8 +1912,9 @@ use openaireconnect;
|
|||
|
||||
// 03-06-2021
|
||||
addFooterDivIdForConnect();
|
||||
addFooterDivIdForCommunities();
|
||||
addFooterHelpTextForConnect();
|
||||
addHomePageInCommunities();
|
||||
addFooterDivIdForCommunities();
|
||||
addFooterHelpTextForCommunities();
|
||||
|
||||
// 04-06-2021 debug helper function
|
||||
|
|
Loading…
Reference in New Issue