@@ -133,14 +133,14 @@ discard block |
||
| 133 | 133 | $class_name = $this->getImplementationClassKeyName(); |
| 134 | 134 | $class_name_txt_key = strtolower($class_name); |
| 135 | 135 | |
| 136 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
| 136 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
| 137 | 137 | $config_vars[] = array( |
| 138 | - 'cachedir_'. $class_name_txt_key, |
|
| 139 | - $txt['cachedir_'. $class_name_txt_key], |
|
| 138 | + 'cachedir_' . $class_name_txt_key, |
|
| 139 | + $txt['cachedir_' . $class_name_txt_key], |
|
| 140 | 140 | 'file', |
| 141 | 141 | 'text', |
| 142 | 142 | 36, |
| 143 | - 'cache_'. $class_name_txt_key .'_cachedir', |
|
| 143 | + 'cache_' . $class_name_txt_key . '_cachedir', |
|
| 144 | 144 | ); |
| 145 | 145 | |
| 146 | 146 | if (!isset($context['settings_post_javascript'])) |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $context['settings_post_javascript'] .= ' |
| 151 | 151 | $("#cache_accelerator").change(function (e) { |
| 152 | 152 | var cache_type = e.currentTarget.value; |
| 153 | - $("#cachedir_'. $class_name_txt_key .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
| 153 | + $("#cachedir_'. $class_name_txt_key . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
| 154 | 154 | });'; |
| 155 | 155 | } |
| 156 | 156 | |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $class_name = $this->getImplementationClassKeyName(); |
| 219 | 219 | $class_name_txt_key = strtolower($class_name); |
| 220 | 220 | |
| 221 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
| 221 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
| 222 | 222 | $config_vars[] = array('cachedir', $txt['cachedir'], 'file', 'text', 36, 'cache_cachedir'); |
| 223 | 223 | |
| 224 | 224 | if (!isset($context['settings_post_javascript'])) |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $context['settings_post_javascript'] .= ' |
| 229 | 229 | $("#cache_accelerator").change(function (e) { |
| 230 | 230 | var cache_type = e.currentTarget.value; |
| 231 | - $("#cachedir").prop("disabled", cache_type != "'. $class_name .'"); |
|
| 231 | + $("#cachedir").prop("disabled", cache_type != "'. $class_name . '"); |
|
| 232 | 232 | });'; |
| 233 | 233 | } |
| 234 | 234 | |
@@ -169,16 +169,16 @@ discard block |
||
| 169 | 169 | { |
| 170 | 170 | global $context, $txt; |
| 171 | 171 | |
| 172 | - if (!in_array($txt[self::CLASS_KEY .'_settings'], $config_vars)) |
|
| 172 | + if (!in_array($txt[self::CLASS_KEY . '_settings'], $config_vars)) |
|
| 173 | 173 | { |
| 174 | - $config_vars[] = $txt[self::CLASS_KEY .'_settings']; |
|
| 174 | + $config_vars[] = $txt[self::CLASS_KEY . '_settings']; |
|
| 175 | 175 | $config_vars[] = array( |
| 176 | 176 | self::CLASS_KEY, |
| 177 | - $txt[self::CLASS_KEY .'_servers'], |
|
| 177 | + $txt[self::CLASS_KEY . '_servers'], |
|
| 178 | 178 | 'file', |
| 179 | 179 | 'text', |
| 180 | 180 | 0, |
| 181 | - 'subtext' => $txt[self::CLASS_KEY .'_servers_subtext']); |
|
| 181 | + 'subtext' => $txt[self::CLASS_KEY . '_servers_subtext']); |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | if (!isset($context['settings_post_javascript'])) |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $context['settings_post_javascript'] .= ' |
| 189 | 189 | $("#cache_accelerator").change(function (e) { |
| 190 | 190 | var cache_type = e.currentTarget.value; |
| 191 | - $("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "MemcacheImplementation" && cache_type != "MemcachedImplementation"); |
|
| 191 | + $("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "MemcacheImplementation" && cache_type != "MemcachedImplementation"); |
|
| 192 | 192 | });'; |
| 193 | 193 | } |
| 194 | 194 | |
@@ -117,7 +117,8 @@ |
||
| 117 | 117 | else |
| 118 | 118 | fatal_lang_error('not_found', false, array(), 404); |
| 119 | 119 | |
| 120 | - switch ($_GET['help']) { |
|
| 120 | + switch ($_GET['help']) |
|
| 121 | + { |
|
| 121 | 122 | case 'cal_short_months': |
| 122 | 123 | $context['help_text'] = sprintf($context['help_text'], $txt['months_short'][1], $txt['months_titles'][1]); |
| 123 | 124 | break; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | } |
| 242 | 242 | if ($c === $n) { |
| 243 | 243 | $q = $delta; |
| 244 | - for ($k = static::BASE;; $k += static::BASE) { |
|
| 244 | + for ($k = static::BASE; ; $k += static::BASE) { |
|
| 245 | 245 | $t = $this->calculateThreshold($k, $bias); |
| 246 | 246 | if ($q < $t) { |
| 247 | 247 | break; |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | $oldi = $i; |
| 345 | 345 | $w = 1; |
| 346 | 346 | |
| 347 | - for ($k = static::BASE;; $k += static::BASE) |
|
| 347 | + for ($k = static::BASE; ; $k += static::BASE) |
|
| 348 | 348 | { |
| 349 | 349 | if (!isset($input[$pos]) || !isset(static::$decodeTable[$input[$pos]])) |
| 350 | 350 | return false; |
@@ -157,12 +157,14 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | $parts = explode('.', $preprocessed); |
| 160 | - foreach ($parts as $p => &$part) { |
|
| 160 | + foreach ($parts as $p => &$part) |
|
| 161 | + { |
|
| 161 | 162 | $part = $this->encodePart($part); |
| 162 | 163 | |
| 163 | 164 | $validation_status = $this->validateLabel($part, true); |
| 164 | 165 | |
| 165 | - switch ($validation_status) { |
|
| 166 | + switch ($validation_status) |
|
| 167 | + { |
|
| 166 | 168 | case self::IDNA_ERROR_LABEL_TOO_LONG: |
| 167 | 169 | case self::IDNA_ERROR_LEADING_HYPHEN: |
| 168 | 170 | case self::IDNA_ERROR_TRAILING_HYPHEN: |
@@ -215,13 +217,16 @@ discard block |
||
| 215 | 217 | $h = $b = count($codePoints['basic']); |
| 216 | 218 | |
| 217 | 219 | $output = ''; |
| 218 | - foreach ($codePoints['basic'] as $code) { |
|
| 220 | + foreach ($codePoints['basic'] as $code) |
|
| 221 | + { |
|
| 219 | 222 | $output .= $this->codePointToChar($code); |
| 220 | 223 | } |
| 221 | - if ($input === $output) { |
|
| 224 | + if ($input === $output) |
|
| 225 | + { |
|
| 222 | 226 | return $output; |
| 223 | 227 | } |
| 224 | - if ($b > 0) { |
|
| 228 | + if ($b > 0) |
|
| 229 | + { |
|
| 225 | 230 | $output .= static::DELIMITER; |
| 226 | 231 | } |
| 227 | 232 | |
@@ -230,20 +235,26 @@ discard block |
||
| 230 | 235 | |
| 231 | 236 | $i = 0; |
| 232 | 237 | $length = mb_strlen($input, $this->encoding); |
| 233 | - while ($h < $length) { |
|
| 238 | + while ($h < $length) |
|
| 239 | + { |
|
| 234 | 240 | $m = $codePoints['nonBasic'][$i++]; |
| 235 | 241 | $delta = $delta + ($m - $n) * ($h + 1); |
| 236 | 242 | $n = $m; |
| 237 | 243 | |
| 238 | - foreach ($codePoints['all'] as $c) { |
|
| 239 | - if ($c < $n || $c < static::INITIAL_N) { |
|
| 244 | + foreach ($codePoints['all'] as $c) |
|
| 245 | + { |
|
| 246 | + if ($c < $n || $c < static::INITIAL_N) |
|
| 247 | + { |
|
| 240 | 248 | $delta++; |
| 241 | 249 | } |
| 242 | - if ($c === $n) { |
|
| 250 | + if ($c === $n) |
|
| 251 | + { |
|
| 243 | 252 | $q = $delta; |
| 244 | - for ($k = static::BASE;; $k += static::BASE) { |
|
| 253 | + for ($k = static::BASE;; $k += static::BASE) |
|
| 254 | + { |
|
| 245 | 255 | $t = $this->calculateThreshold($k, $bias); |
| 246 | - if ($q < $t) { |
|
| 256 | + if ($q < $t) |
|
| 257 | + { |
|
| 247 | 258 | break; |
| 248 | 259 | } |
| 249 | 260 | |