Skip to content

Commit

Permalink
🐷 Rename 'favicon' to 'icon' (#7888)
Browse files Browse the repository at this point in the history
refs #7688

Just renames `favicon` to `icon` as our usage for it will not be for favicon purposes only.
  • Loading branch information
aileen authored and kirrg001 committed Jan 25, 2017
1 parent cce3194 commit ca521e2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions core/server/api/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ updateConfigCache = function () {
config.set('theme:timezone', (settingsCache.activeTimezone && settingsCache.activeTimezone.value) || config.get('theme').timezone);
config.set('theme:url', globalUtils.url.urlFor('home', true));
config.set('theme:amp', (settingsCache.amp && settingsCache.amp.value === 'true'));
config.set('theme:favicon', (settingsCache.favicon && settingsCache.favicon.value) ?
{type: 'upload', url: (settingsCache.favicon && settingsCache.favicon.value)} :
{type: 'default', url: config.get('theme:favicon')});
config.set('theme:icon', (settingsCache.icon && settingsCache.icon.value) ?
{type: 'upload', url: (settingsCache.icon && settingsCache.icon.value)} :
{type: 'default', url: config.get('theme:icon')});

_.each(labsValue, function (value, key) {
config.set('labs:' + key, value);
Expand Down
2 changes: 1 addition & 1 deletion core/server/config/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"theme": {
"timezone": "Etc/UTC",
"favicon": {
"icon": {
"type": "default",
"url": "core/shared/favicon.ico"
}
Expand Down
2 changes: 1 addition & 1 deletion core/server/data/schema/default-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"cover": {
"defaultValue": ""
},
"favicon": {
"icon": {
"defaultValue": ""
},
"defaultLang": {
Expand Down
16 changes: 8 additions & 8 deletions core/test/unit/config/index_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Config', function () {
logo: 'casper',
cover: 'casper',
timezone: 'Etc/UTC',
favicon: {
icon: {
type: 'default',
url: 'core/shared/favicon.ico'
}
Expand All @@ -49,7 +49,7 @@ describe('Config', function () {
var themeConfig = config.get('theme');

// This will fail if there are any extra keys
themeConfig.should.have.keys('title', 'description', 'logo', 'cover', 'timezone', 'favicon');
themeConfig.should.have.keys('title', 'description', 'logo', 'cover', 'timezone', 'icon');
});

it('should have the correct values for each key', function () {
Expand All @@ -61,7 +61,7 @@ describe('Config', function () {
themeConfig.should.have.property('logo', 'casper');
themeConfig.should.have.property('cover', 'casper');
themeConfig.should.have.property('timezone', 'Etc/UTC');
themeConfig.should.have.property('favicon', {
themeConfig.should.have.property('icon', {
type: 'default',
url: 'core/shared/favicon.ico'
});
Expand Down Expand Up @@ -94,25 +94,25 @@ describe('Config', function () {
});

describe('Favicon default', function () {
it('should use uploaded favicon', function () {
it('should use uploaded blog icon', function () {
var themeConfig = config.get('theme');

// Check values are as we expect
themeConfig.should.have.property('favicon', {
themeConfig.should.have.property('icon', {
type: 'default',
url: 'core/shared/favicon.ico'
});

configUtils.set({
theme: {
favicon: {
icon: {
type: 'upload',
url: 'content/images/favicon.ico'
}
}
});

config.get('theme').should.have.property('favicon', {
config.get('theme').should.have.property('icon', {
type: 'upload',
url: 'content/images/favicon.ico'
});
Expand All @@ -123,7 +123,7 @@ describe('Config', function () {

// Check values are as we expect
themeConfig.should.have.property('theme');
themeConfig.theme.should.have.property('favicon', {
themeConfig.theme.should.have.property('icon', {
type: 'default',
url: 'core/shared/favicon.ico'
});
Expand Down

0 comments on commit ca521e2

Please sign in to comment.