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

GC-2000: abolish highlightJsStyle and highlightJsStyleBorder

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

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

@@ -473,16 +473,6 @@ module.exports = function(crowi) {
     return crowi.xss.process(customTitle);
   };
 
-  configSchema.statics.highlightJsStyle = function(config) {
-    const key = 'customize:highlightJsStyle';
-    return getValueForCrowiNS(config, key);
-  };
-
-  configSchema.statics.highlightJsStyleBorder = function(config) {
-    const key = 'customize:highlightJsStyleBorder';
-    return getValueForCrowiNS(config, key);
-  };
-
   configSchema.statics.isEnabledTimeline = function(config) {
     const key = 'customize:isEnabledTimeline';
     return getValueForCrowiNS(config, key);

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

@@ -238,13 +238,11 @@ module.exports = function(crowi, app, req, locals) {
   };
 
   locals.highlightJsStyle = function() {
-    const config = crowi.getConfig();
-    return Config.highlightJsStyle(config);
+    return configManager.getConfig('crowi', 'customize:highlightJsStyle');
   };
 
   locals.highlightJsStyleBorder = function() {
-    const config = crowi.getConfig();
-    return Config.highlightJsStyleBorder(config);
+    return configManager.getConfig('crowi', 'customize:highlightJsStyleBorder');
   };
 
   locals.isEnabledTimeline = function() {