@@ -11,8 +11,9 @@ discard block |
||
| 11 | 11 | * @version 2.1 Beta 3 |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -if (!defined('SMF')) |
|
| 14 | +if (!defined('SMF')) { |
|
| 15 | 15 | die('Hacking attempt...'); |
| 16 | +} |
|
| 16 | 17 | |
| 17 | 18 | /** |
| 18 | 19 | * SQLite Cache API class |
@@ -61,8 +62,9 @@ discard block |
||
| 61 | 62 | { |
| 62 | 63 | $supported = class_exists("SQLite3") && is_writable($this->cachedir); |
| 63 | 64 | |
| 64 | - if ($test) |
|
| 65 | - return $supported; |
|
| 65 | + if ($test) { |
|
| 66 | + return $supported; |
|
| 67 | + } |
|
| 66 | 68 | |
| 67 | 69 | return parent::isSupported() && $supported; |
| 68 | 70 | } |
@@ -120,8 +122,9 @@ discard block |
||
| 120 | 122 | $config_vars[] = $txt['cache_sqlite_settings']; |
| 121 | 123 | $config_vars[] = array('cachedir_sqlite', $txt['cachedir_sqlite'], 'file', 'text', 36, 'cache_sqlite_cachedir'); |
| 122 | 124 | |
| 123 | - if (!isset($context['settings_post_javascript'])) |
|
| 124 | - $context['settings_post_javascript'] = ''; |
|
| 125 | + if (!isset($context['settings_post_javascript'])) { |
|
| 126 | + $context['settings_post_javascript'] = ''; |
|
| 127 | + } |
|
| 125 | 128 | |
| 126 | 129 | $context['settings_post_javascript'] .= ' |
| 127 | 130 | $("#cache_accelerator").change(function (e) { |
@@ -142,10 +145,11 @@ discard block |
||
| 142 | 145 | global $cachedir_sqlite; |
| 143 | 146 | |
| 144 | 147 | // If its invalid, use SMF's. |
| 145 | - if (is_null($dir) || !is_writable($dir)) |
|
| 146 | - $this->cachedir = $cachedir_sqlite; |
|
| 147 | - else |
|
| 148 | - $this->cachedir = $dir; |
|
| 148 | + if (is_null($dir) || !is_writable($dir)) { |
|
| 149 | + $this->cachedir = $cachedir_sqlite; |
|
| 150 | + } else { |
|
| 151 | + $this->cachedir = $dir; |
|
| 152 | + } |
|
| 149 | 153 | } |
| 150 | 154 | |
| 151 | 155 | } |