| @@ 161-176 (lines=16) @@ | ||
| 158 | /** |
|
| 159 | * {@inheritDoc} |
|
| 160 | */ |
|
| 161 | public function cacheSettings(array &$config_vars) |
|
| 162 | { |
|
| 163 | global $context, $txt; |
|
| 164 | ||
| 165 | $config_vars[] = $txt['cache_smf_settings']; |
|
| 166 | $config_vars[] = array('cachedir', $txt['cachedir'], 'file', 'text', 36, 'cache_cachedir'); |
|
| 167 | ||
| 168 | if (!isset($context['settings_post_javascript'])) |
|
| 169 | $context['settings_post_javascript'] = ''; |
|
| 170 | ||
| 171 | $context['settings_post_javascript'] .= ' |
|
| 172 | $("#cache_accelerator").change(function (e) { |
|
| 173 | var cache_type = e.currentTarget.value; |
|
| 174 | $("#cachedir").prop("disabled", cache_type != "smf"); |
|
| 175 | });'; |
|
| 176 | } |
|
| 177 | ||
| 178 | /** |
|
| 179 | * Sets the $cachedir or uses the SMF default $cachedir.. |
|
| @@ 127-142 (lines=16) @@ | ||
| 124 | /** |
|
| 125 | * {@inheritDoc} |
|
| 126 | */ |
|
| 127 | public function cacheSettings(array &$config_vars) |
|
| 128 | { |
|
| 129 | global $context, $txt; |
|
| 130 | ||
| 131 | $config_vars[] = $txt['cache_sqlite_settings']; |
|
| 132 | $config_vars[] = array('cachedir_sqlite', $txt['cachedir_sqlite'], 'file', 'text', 36, 'cache_sqlite_cachedir'); |
|
| 133 | ||
| 134 | if (!isset($context['settings_post_javascript'])) |
|
| 135 | $context['settings_post_javascript'] = ''; |
|
| 136 | ||
| 137 | $context['settings_post_javascript'] .= ' |
|
| 138 | $("#cache_accelerator").change(function (e) { |
|
| 139 | var cache_type = e.currentTarget.value; |
|
| 140 | $("#cachedir_sqlite").prop("disabled", cache_type != "sqlite"); |
|
| 141 | });'; |
|
| 142 | } |
|
| 143 | ||
| 144 | /** |
|
| 145 | * Sets the $cachedir or uses the SMF default $cachedir.. |
|