From 0b0608d7d41ec2120bd7ec714f274afa033aa163 Mon Sep 17 00:00:00 2001 From: muxator Date: Sun, 19 Apr 2020 02:58:35 +0200 Subject: [PATCH] skins: use "colibris" as default, even when no settings.json is present Starting with Etherpad 1.8.3 we decided to use Colibris as default skin for new installs. Without this change, when starting with no settings.json file, Etherpad would (wrongly) use "no-skin". This change should have been part of 70bc71c0c3a7. --- src/node/utils/Settings.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 91fe5d7c..d9e03acf 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -626,19 +626,19 @@ exports.reloadSettings = function reloadSettings() { log4js.replaceConsole(); if (!exports.skinName) { - console.warn(`No "skinName" parameter found. Please check out settings.json.template and update your settings.json. Falling back to the default "no-skin".`); - exports.skinName = "no-skin"; + console.warn(`No "skinName" parameter found. Please check out settings.json.template and update your settings.json. Falling back to the default "colibris".`); + exports.skinName = "colibris"; } - // checks if skinName has an acceptable value, otherwise falls back to "no-skin" + // checks if skinName has an acceptable value, otherwise falls back to "colibris" if (exports.skinName) { const skinBasePath = path.join(exports.root, "src", "static", "skins"); const countPieces = exports.skinName.split(path.sep).length; if (countPieces != 1) { - console.error(`skinName must be the name of a directory under "${skinBasePath}". This is not valid: "${exports.skinName}". Falling back to the default "no-skin".`); + console.error(`skinName must be the name of a directory under "${skinBasePath}". This is not valid: "${exports.skinName}". Falling back to the default "colibris".`); - exports.skinName = "no-skin"; + exports.skinName = "colibris"; } // informative variable, just for the log messages @@ -646,15 +646,15 @@ exports.reloadSettings = function reloadSettings() { // what if someone sets skinName == ".." or "."? We catch him! if (absolutePaths.isSubdir(skinBasePath, skinPath) === false) { - console.error(`Skin path ${skinPath} must be a subdirectory of ${skinBasePath}. Falling back to the default "no-skin".`); + console.error(`Skin path ${skinPath} must be a subdirectory of ${skinBasePath}. Falling back to the default "colibris".`); - exports.skinName = "no-skin"; + exports.skinName = "colibris"; skinPath = path.join(skinBasePath, exports.skinName); } if (fs.existsSync(skinPath) === false) { - console.error(`Skin path ${skinPath} does not exist. Falling back to the default "no-skin".`); - exports.skinName = "no-skin"; + console.error(`Skin path ${skinPath} does not exist. Falling back to the default "colibris".`); + exports.skinName = "colibris"; skinPath = path.join(skinBasePath, exports.skinName); }