Skip to content

Commit

Permalink
getGlobalSiteContext crafts supportedLocales as an object already
Browse files Browse the repository at this point in the history
  • Loading branch information
wesanderson303 committed Jan 12, 2016
1 parent 19df9b2 commit 0350744
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions include/service/entities/site_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,16 +602,13 @@ module.exports = function SiteServiceModule(pb) {
* @return {Object}
*/
SiteService.getGlobalSiteContext = function() {
var defaultLocale = pb.Localization.getDefaultLocale();
var defaultSupportedLocales = {};
defaultSupportedLocales[defaultLocale] = true;
return {
displayName: pb.config.siteName,
uid: pb.SiteService.GLOBAL_SITE,
hostname: pb.config.multisite.enabled ? url.parse(pb.config.multisite.globalRoot).host : url.parse(pb.config.siteRoot).host,
active: pb.config.multisite.enabled ? false : true,
defaultLocale: defaultLocale,
supportedLocales: defaultSupportedLocales,
defaultLocale: pb.Localization.getDefaultLocale(),
supportedLocales: util.arrayToObj(pb.Localization.getSupported(), function(a, i) { return a[i]; }, function(a, i) { return true; }),
prevHostnames: []
};
};
Expand Down

0 comments on commit 0350744

Please sign in to comment.