[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() {
|
function addFooterDivIdForCommunities() {
|
||||||
// db.page.save({ "route" : "/", "name" : "Home", "type" : "other", "entities" : [ ], "portalType" : "community", "top" : false, "bottom" : false, "left" : false, "right" : false });
|
// 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");
|
// print("page 'Home' added for communities");
|
||||||
addHomePageInCommunities();
|
|
||||||
|
|
||||||
communityHomePageID = db.page.find({"portalType": "community", "route": "/"}).map( function(community) { return community._id.str; } ).toString();
|
communityHomePageID = db.page.find({"portalType": "community", "route": "/"}).map( function(community) { return community._id.str; } ).toString();
|
||||||
db.divId.save({ "name" : "footer", "pages" : [ communityHomePageID ], "portalType" : "community" });
|
db.divId.save({ "name" : "footer", "pages" : [ communityHomePageID ], "portalType" : "community" });
|
||||||
|
@ -1751,7 +1750,7 @@ function addHomePageInCommunities() {
|
||||||
community_pages[communityHomePageID] = true;
|
community_pages[communityHomePageID] = true;
|
||||||
|
|
||||||
community_pid = communities[i].pid;
|
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);
|
print("Add home page with id " + communityHomePageID + " on community " + community_pid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1913,8 +1912,9 @@ use openaireconnect;
|
||||||
|
|
||||||
// 03-06-2021
|
// 03-06-2021
|
||||||
addFooterDivIdForConnect();
|
addFooterDivIdForConnect();
|
||||||
addFooterDivIdForCommunities();
|
|
||||||
addFooterHelpTextForConnect();
|
addFooterHelpTextForConnect();
|
||||||
|
addHomePageInCommunities();
|
||||||
|
addFooterDivIdForCommunities();
|
||||||
addFooterHelpTextForCommunities();
|
addFooterHelpTextForCommunities();
|
||||||
|
|
||||||
// 04-06-2021 debug helper function
|
// 04-06-2021 debug helper function
|
||||||
|
|
Loading…
Reference in New Issue