Skip to content

Commit

Permalink
Merge pull request pencilblue#923 from careerbuilder/0.5.0
Browse files Browse the repository at this point in the history
0.5.0
  • Loading branch information
brianhyder committed Jan 12, 2016
2 parents 3971100 + 66d2df7 commit ba8641b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion controllers/base_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ module.exports = function BaseControllerModule(pb) {
this.siteObj = props.siteObj;
this.site = props.site;
this.siteName = props.siteName;
this.hostname = SiteService.getHostWithProtocol(self.siteObj.hostname) || self.ts.siteRoot;
this.hostname = SiteService.getHostWithProtocol(self.siteObj.hostname) || pb.config.siteRoot;
this.referer = this.req.headers.referer;

/**
* @property ts
Expand Down
1 change: 0 additions & 1 deletion include/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ module.exports = function LocalizationModule(pb) {
* @param {Function} cb
*/
Localization.init = function(cb) {
var supportedLocales = [];
Localization.storage = {};
Localization.keys = {};

Expand Down
2 changes: 1 addition & 1 deletion include/service/entities/plugin_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,7 @@ module.exports = function PluginServiceModule(pb) {

//validate pb_version in config against pb version
else if (!semver.satisfies(pb.config.version, details.pb_version)) {
errors.push("Version " + details.version + " is incompatible with PencilBlue version " + pb.config.version);
errors.push("Version " + details.pb_version + " is incompatible with PencilBlue version " + pb.config.version);
}
}

Expand Down
7 changes: 5 additions & 2 deletions include/service/entities/site_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,14 @@ module.exports = function SiteServiceModule(pb) {
return cb(err);
}

var defaultLocale = pb.Localization.getDefaultLocale();
var defaultSupportedLocales = {};
defaultSupportedLocales[defaultLocale] = true;
//only load the sites when we are in multi-site mode
if (pb.config.multisite.enabled) {
util.forEach(results, function (site) {
site.defaultLocale = site.defaultLocale || pb.Localization.getDefaultLocale();
site.supportedLocales = site.supportedLocales || [site.defaultLocale];
site.defaultLocale = site.defaultLocale || defaultLocale;
site.supportedLocales = site.supportedLocales || defaultSupportedLocales;
site.prevHostnames = site.prevHostnames || [];
pb.RequestHandler.loadSite(site);
});
Expand Down

0 comments on commit ba8641b

Please sign in to comment.