Просмотр исходного кода

GC-2000: abolish customHeader method

Yuki Takei 6 лет назад
Родитель
Сommit
19233a036f
2 измененных файлов с 1 добавлено и 7 удалено
  1. 0 5
      src/server/models/config.js
  2. 1 2
      src/server/util/swigFunctions.js

+ 0 - 5
src/server/models/config.js

@@ -455,11 +455,6 @@ module.exports = function(crowi) {
     return this._customScript;
   };
 
-  configSchema.statics.customHeader = function(config) {
-    const key = 'customize:header';
-    return getValueForCrowiNS(config, key);
-  };
-
   configSchema.statics.customTitle = function(config, page) {
     validateCrowi();
 

+ 1 - 2
src/server/util/swigFunctions.js

@@ -221,8 +221,7 @@ module.exports = function(crowi, app, req, locals) {
   };
 
   locals.customHeader = function() {
-    const config = crowi.getConfig();
-    return Config.customHeader(config);
+    return configManager.getConfig('crowi', 'customize:header') || '';
   };
 
   locals.customTitle = function(page) {