Project

General

Profile

« Previous | Next » 

Revision 61095

[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).

View differences:

modules/uoa-admin-tools/trunk/update_db.js
1734 1734
function addFooterDivIdForCommunities() {
1735 1735
  // db.page.save({ "route" : "/", "name" : "Home", "type" : "other", "entities" : [ ], "portalType" : "community", "top" : false, "bottom" : false, "left" : false, "right" : false });
1736 1736
  // print("page 'Home' added for communities");
1737
  addHomePageInCommunities();
1738 1737

  
1739 1738
  communityHomePageID = db.page.find({"portalType": "community", "route": "/"}).map( function(community) { return community._id.str; } ).toString();
1740 1739
  db.divId.save({ "name" : "footer", "pages" : [ communityHomePageID ], "portalType" : "community" });
......
1751 1750
    community_pages[communityHomePageID] = true;
1752 1751

  
1753 1752
    community_pid = communities[i].pid;
1754
    db.community.update({ "pid" : community_pid },{$set: { "pages": community_pages}});
1753
    db.portal.update({ "pid" : community_pid },{$set: { "pages": community_pages}});
1755 1754
    print("Add home page with id " + communityHomePageID + " on community " + community_pid);
1756 1755
  }
1757 1756
}
......
1913 1912

  
1914 1913
// 03-06-2021
1915 1914
addFooterDivIdForConnect();
1915
addFooterHelpTextForConnect();
1916
addHomePageInCommunities();
1916 1917
addFooterDivIdForCommunities();
1917
addFooterHelpTextForConnect();
1918 1918
addFooterHelpTextForCommunities();
1919 1919

  
1920 1920
// 04-06-2021 debug helper function

Also available in: Unified diff