Description:
fixed error in config index
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r316:fdc96046b715 - - 2 files changed: 5 inserted, 5 deleted
@@ -15,12 +15,16 | |||
|
15 | 15 | cattr_accessor :contest_time_str |
|
16 | 16 | cattr_accessor :contest_time |
|
17 | 17 | |
|
18 | 18 | Configuration.config_cache = nil |
|
19 | 19 | Configuration.task_grading_info_cache = nil |
|
20 | 20 | |
|
21 | + def self.config_cached? | |
|
22 | + (defined? CONFIGURATION_CACHE_ENABLED) and (CONFIGURATION_CACHE_ENABLED) | |
|
23 | + end | |
|
24 | + | |
|
21 | 25 | def self.get(key) |
|
22 | 26 | if Configuration.config_cached? |
|
23 | 27 | if Configuration.config_cache == nil |
|
24 | 28 | self.read_config |
|
25 | 29 | end |
|
26 | 30 | return Configuration.config_cache[key] |
@@ -129,16 +133,12 | |||
|
129 | 133 | end |
|
130 | 134 | return Configuration.contest_time |
|
131 | 135 | end |
|
132 | 136 | |
|
133 | 137 | protected |
|
134 | 138 | |
|
135 | - def self.config_cached? | |
|
136 | - (defined? CONFIGURATION_CACHE_ENABLED) and (CONFIGURATION_CACHE_ENABLED) | |
|
137 | - end | |
|
138 | - | |
|
139 | 139 | def self.convert_type(val,type) |
|
140 | 140 | case type |
|
141 | 141 | when 'string' |
|
142 | 142 | return val |
|
143 | 143 | |
|
144 | 144 | when 'integer' |
@@ -17,13 +17,13 | |||
|
17 | 17 | %td |
|
18 | 18 | = in_place_editor_field :configuration, :value_type, {}, :rows=>1 |
|
19 | 19 | %td |
|
20 | 20 | = in_place_editor_field :configuration, :value, {}, :rows=>1 |
|
21 | 21 | %td= conf.description |
|
22 | 22 | |
|
23 | - - if Configuration.cache? | |
|
23 | + - if Configuration.config_cached? | |
|
24 | 24 | %br/ |
|
25 | 25 | Your config is saved, but it does not automatically take effect. |
|
26 | 26 | %br/ |
|
27 | 27 | If you have one mongrel process running, you can |
|
28 | 28 | = link_to '[click]', :action => 'reload' |
|
29 | 29 | here to reload. |
You need to be logged in to leave comments.
Login now