@@ -2291,7 +2291,6 @@ |
||
| 2291 | 2291 | list ($hookData['class'], $hookData['method']) = explode('::', $modFunc); |
| 2292 | 2292 | $hookData['pureFunc'] = $hookData['method']; |
| 2293 | 2293 | } |
| 2294 | - |
|
| 2295 | 2294 | else |
| 2296 | 2295 | $hookData['pureFunc'] = $modFunc; |
| 2297 | 2296 | |
@@ -3219,7 +3219,7 @@ discard block |
||
| 3219 | 3219 | // Deleting an existing label? |
| 3220 | 3220 | elseif (isset($_POST['delete'], $_POST['delete_label'])) |
| 3221 | 3221 | { |
| 3222 | - foreach ($_POST['delete_label'] AS $label => $dummy) |
|
| 3222 | + foreach ($_POST['delete_label'] as $label => $dummy) |
|
| 3223 | 3223 | { |
| 3224 | 3224 | unset($the_labels[$label]); |
| 3225 | 3225 | $labels_to_remove[] = $label; |
@@ -3260,7 +3260,7 @@ discard block |
||
| 3260 | 3260 | if (!empty($labels_to_add)) |
| 3261 | 3261 | { |
| 3262 | 3262 | $inserts = array(); |
| 3263 | - foreach ($labels_to_add AS $label) |
|
| 3263 | + foreach ($labels_to_add as $label) |
|
| 3264 | 3264 | $inserts[] = array($user_info['id'], $label); |
| 3265 | 3265 | |
| 3266 | 3266 | $smcFunc['db_insert']('', '{db_prefix}pm_labels', array('id_member' => 'int', 'name' => 'string-30'), $inserts, array()); |
@@ -3269,7 +3269,7 @@ discard block |
||
| 3269 | 3269 | // Update existing labels as needed |
| 3270 | 3270 | if (!empty($label_upates)) |
| 3271 | 3271 | { |
| 3272 | - foreach ($label_updates AS $id => $name) |
|
| 3272 | + foreach ($label_updates as $id => $name) |
|
| 3273 | 3273 | { |
| 3274 | 3274 | $smcFunc['db_query']('', ' |
| 3275 | 3275 | UPDATE {db_prefix}labels |
@@ -849,7 +849,6 @@ |
||
| 849 | 849 | die("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B"); |
| 850 | 850 | } |
| 851 | 851 | } |
| 852 | - |
|
| 853 | 852 | elseif ($_REQUEST['format'] === '.wav') |
| 854 | 853 | { |
| 855 | 854 | require_once($sourcedir . '/Subs-Sound.php'); |
@@ -315,7 +315,7 @@ |
||
| 315 | 315 | |
| 316 | 316 | array_walk_recursive( |
| 317 | 317 | $_POST, |
| 318 | - function (&$value, $key) use ($context, $smcFunc) |
|
| 318 | + function(&$value, $key) use ($context, $smcFunc) |
|
| 319 | 319 | { |
| 320 | 320 | // Replace any kind of space with a normal space, and remove any kind of control character, then trim. |
| 321 | 321 | $value = $smcFunc['htmltrim'](preg_replace(array('~[\h\v]+~' . ($context['utf8'] ? 'u' : ''), '~\p{Cc}+~'), array(' ', ''), $value)); |
@@ -756,7 +756,6 @@ |
||
| 756 | 756 | $groups[$row['id_group']]['num_members'] += $row['num_members']; |
| 757 | 757 | $smcFunc['db_free_result']($query); |
| 758 | 758 | } |
| 759 | - |
|
| 760 | 759 | else |
| 761 | 760 | { |
| 762 | 761 | $query = $smcFunc['db_query']('', ' |
@@ -332,7 +332,6 @@ discard block |
||
| 332 | 332 | $replacement .= $precedingStyle . $extra_attr . $afterStyle; |
| 333 | 333 | } |
| 334 | 334 | } |
| 335 | - |
|
| 336 | 335 | elseif (preg_match('~</([A-Za-z]+)>~', $part, $matches) === 1) |
| 337 | 336 | { |
| 338 | 337 | // Is this the element that we've been waiting for to be closed? |
@@ -592,7 +591,6 @@ discard block |
||
| 592 | 591 | $parts[$i + 2] = str_repeat("\t", $listDepth) . '[/list]'; |
| 593 | 592 | $parts[$i + 3] = ''; |
| 594 | 593 | } |
| 595 | - |
|
| 596 | 594 | else |
| 597 | 595 | { |
| 598 | 596 | // We're in a list item. |
@@ -631,7 +629,6 @@ discard block |
||
| 631 | 629 | $parts[$i + 2] = ''; |
| 632 | 630 | $parts[$i + 3] = ''; |
| 633 | 631 | } |
| 634 | - |
|
| 635 | 632 | else |
| 636 | 633 | { |
| 637 | 634 | // Remove the trailing breaks from the list item. |
@@ -280,7 +280,7 @@ |
||
| 280 | 280 | $ret .= |
| 281 | 281 | chr(($this->m_arColors[$i] & 0x000000FF)) . // R |
| 282 | 282 | chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G |
| 283 | - chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B |
|
| 283 | + chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | return $ret; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | if ($c === $n) { |
| 147 | 147 | $q = $delta; |
| 148 | - for ($k = static::BASE;; $k += static::BASE) { |
|
| 148 | + for ($k = static::BASE; ; $k += static::BASE) { |
|
| 149 | 149 | $t = $this->calculateThreshold($k, $bias); |
| 150 | 150 | if ($q < $t) { |
| 151 | 151 | break; |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $oldi = $i; |
| 228 | 228 | $w = 1; |
| 229 | 229 | |
| 230 | - for ($k = static::BASE;; $k += static::BASE) |
|
| 230 | + for ($k = static::BASE; ; $k += static::BASE) |
|
| 231 | 231 | { |
| 232 | 232 | $digit = static::$decodeTable[$input[$pos++]]; |
| 233 | 233 | $i = $i + ($digit * $w); |
@@ -94,7 +94,8 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | $input = mb_strtolower($input, $this->encoding); |
| 96 | 96 | $parts = explode('.', $input); |
| 97 | - foreach ($parts as &$part) { |
|
| 97 | + foreach ($parts as &$part) |
|
| 98 | + { |
|
| 98 | 99 | $part = $this->encodePart($part); |
| 99 | 100 | } |
| 100 | 101 | $output = implode('.', $parts); |
@@ -119,13 +120,16 @@ discard block |
||
| 119 | 120 | $h = $b = count($codePoints['basic']); |
| 120 | 121 | |
| 121 | 122 | $output = ''; |
| 122 | - foreach ($codePoints['basic'] as $code) { |
|
| 123 | + foreach ($codePoints['basic'] as $code) |
|
| 124 | + { |
|
| 123 | 125 | $output .= $this->codePointToChar($code); |
| 124 | 126 | } |
| 125 | - if ($input === $output) { |
|
| 127 | + if ($input === $output) |
|
| 128 | + { |
|
| 126 | 129 | return $output; |
| 127 | 130 | } |
| 128 | - if ($b > 0) { |
|
| 131 | + if ($b > 0) |
|
| 132 | + { |
|
| 129 | 133 | $output .= static::DELIMITER; |
| 130 | 134 | } |
| 131 | 135 | |
@@ -134,20 +138,26 @@ discard block |
||
| 134 | 138 | |
| 135 | 139 | $i = 0; |
| 136 | 140 | $length = mb_strlen($input, $this->encoding); |
| 137 | - while ($h < $length) { |
|
| 141 | + while ($h < $length) |
|
| 142 | + { |
|
| 138 | 143 | $m = $codePoints['nonBasic'][$i++]; |
| 139 | 144 | $delta = $delta + ($m - $n) * ($h + 1); |
| 140 | 145 | $n = $m; |
| 141 | 146 | |
| 142 | - foreach ($codePoints['all'] as $c) { |
|
| 143 | - if ($c < $n || $c < static::INITIAL_N) { |
|
| 147 | + foreach ($codePoints['all'] as $c) |
|
| 148 | + { |
|
| 149 | + if ($c < $n || $c < static::INITIAL_N) |
|
| 150 | + { |
|
| 144 | 151 | $delta++; |
| 145 | 152 | } |
| 146 | - if ($c === $n) { |
|
| 153 | + if ($c === $n) |
|
| 154 | + { |
|
| 147 | 155 | $q = $delta; |
| 148 | - for ($k = static::BASE;; $k += static::BASE) { |
|
| 156 | + for ($k = static::BASE;; $k += static::BASE) |
|
| 157 | + { |
|
| 149 | 158 | $t = $this->calculateThreshold($k, $bias); |
| 150 | - if ($q < $t) { |
|
| 159 | + if ($q < $t) |
|
| 160 | + { |
|
| 151 | 161 | break; |
| 152 | 162 | } |
| 153 | 163 | |
@@ -979,7 +979,8 @@ discard block |
||
| 979 | 979 | $error_array[2] = null; |
| 980 | 980 | |
| 981 | 981 | if(empty($db_persist)) |
| 982 | - { // without pooling |
|
| 982 | + { |
|
| 983 | +// without pooling |
|
| 983 | 984 | if (empty($pg_error_data_prep)) |
| 984 | 985 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
| 985 | 986 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -990,7 +991,8 @@ discard block |
||
| 990 | 991 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
| 991 | 992 | } |
| 992 | 993 | else |
| 993 | - { //with pooling |
|
| 994 | + { |
|
| 995 | +//with pooling |
|
| 994 | 996 | $pg_error_data_prep = pg_prepare($db_connection, '', |
| 995 | 997 | 'INSERT INTO ' . $db_prefix . 'log_errors |
| 996 | 998 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |
@@ -670,7 +670,7 @@ |
||
| 670 | 670 | foreach ($columns as $columnName => $type) |
| 671 | 671 | { |
| 672 | 672 | //check pk fiel |
| 673 | - IF (in_array($columnName, $keys)) |
|
| 673 | + if (in_array($columnName, $keys)) |
|
| 674 | 674 | { |
| 675 | 675 | $key_str .= ($count_pk > 0 ? ',' : ''); |
| 676 | 676 | $key_str .= $columnName; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | display_db_error(); |
| 76 | 76 | |
| 77 | 77 | // We need to escape ' and \ |
| 78 | - $db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd); |
|
| 78 | + $db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd); |
|
| 79 | 79 | |
| 80 | 80 | // Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch. |
| 81 | 81 | set_error_handler( |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false) |
| 911 | 911 | $error_array[2] = null; |
| 912 | 912 | |
| 913 | - if(empty($db_persist)) |
|
| 913 | + if (empty($db_persist)) |
|
| 914 | 914 | { // without pooling |
| 915 | 915 | if (empty($pg_error_data_prep)) |
| 916 | 916 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
@@ -738,7 +738,7 @@ |
||
| 738 | 738 | ); |
| 739 | 739 | else |
| 740 | 740 | $context['allowed_actions'] = array( |
| 741 | - 'ok' => $txt['admin_browse_w_approve'] .' '. $txt['admin_browse_no_email'], |
|
| 741 | + 'ok' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_no_email'], |
|
| 742 | 742 | 'okemail' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_w_email'], |
| 743 | 743 | 'require_activation' => $txt['admin_browse_w_approve_require_activate'], |
| 744 | 744 | 'reject' => $txt['admin_browse_w_reject'], |