소스 검색

bugfix: js tracker content was read from file on each request.

Damien ACCORSI 10 년 전
부모
커밋
116f8f5701
1개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 7
      tracim/tracim/lib/helpers.py

+ 1 - 7
tracim/tracim/lib/helpers.py 파일 보기

65
   Private = '<i class="fa fa-key"></i>'
65
   Private = '<i class="fa fa-key"></i>'
66
 
66
 
67
 def tracker_js():
67
 def tracker_js():
68
-    js_file_path = tg.config.get('js_tracker_path', None)
69
-    if js_file_path is not None:
70
-        with open (js_file_path, "r") as js_file:
71
-            data=js_file.read()
72
-        return data
73
-    else:
74
-        return ""
68
+    return CFG.get_instance().TRACKER_JS_CONTENT
75
 
69
 
76
 def IconPath(icon_size, icon_path):
70
 def IconPath(icon_size, icon_path):
77
     return tg.url('/assets/icons/{0}x{0}/{1}.png'.format(icon_size, icon_path))
71
     return tg.url('/assets/icons/{0}x{0}/{1}.png'.format(icon_size, icon_path))