@@ -419,7 +419,7 @@ |
||
419 | 419 | |
420 | 420 | if (checkImagick()) |
421 | 421 | { |
422 | - $imagick = New Imagick($destName); |
|
422 | + $imagick = new Imagick($destName); |
|
423 | 423 | $src_width = empty($src_width) ? $imagick->getImageWidth() : $src_width; |
424 | 424 | $src_height = empty($src_height) ? $imagick->getImageHeight() : $src_height; |
425 | 425 | $dest_width = empty($max_width) ? $src_width : $max_width; |
@@ -93,7 +93,6 @@ |
||
93 | 93 | |
94 | 94 | continue; |
95 | 95 | } |
96 | - |
|
97 | 96 | elseif (empty($row['show_online']) && empty($membersOnlineOptions['show_hidden'])) |
98 | 97 | { |
99 | 98 | // Just increase the stats and don't add this hidden user to any list. |
@@ -881,7 +881,6 @@ discard block |
||
881 | 881 | $is_writable = true; |
882 | 882 | break; |
883 | 883 | } |
884 | - |
|
885 | 884 | else |
886 | 885 | { |
887 | 886 | // Convert the chmod value from octal (0777) to text ("777"). |
@@ -935,8 +934,9 @@ discard block |
||
935 | 934 | { |
936 | 935 | // Wait for a response that isn't continued with -, but don't wait too long. |
937 | 936 | $time = time(); |
938 | - do |
|
939 | - $this->last_message = fgets($this->connection, 1024); |
|
937 | + do { |
|
938 | + $this->last_message = fgets($this->connection, 1024); |
|
939 | + } |
|
940 | 940 | while ((strlen($this->last_message) < 4 || strpos($this->last_message, ' ') === 0 || strpos($this->last_message, ' ', 3) !== 3) && time() - $time < 5); |
941 | 941 | |
942 | 942 | // Was the desired response returned? |
@@ -957,8 +957,9 @@ discard block |
||
957 | 957 | // Request a passive connection - this means, we'll talk to you, you don't talk to us. |
958 | 958 | @fwrite($this->connection, 'PASV' . "\r\n"); |
959 | 959 | $time = time(); |
960 | - do |
|
961 | - $response = fgets($this->connection, 1024); |
|
960 | + do { |
|
961 | + $response = fgets($this->connection, 1024); |
|
962 | + } |
|
962 | 963 | while (strpos($response, ' ', 3) !== 3 && time() - $time < 5); |
963 | 964 | |
964 | 965 | // If it's not 227, we weren't given an IP and port, which means it failed. |
@@ -1080,8 +1081,9 @@ discard block |
||
1080 | 1081 | |
1081 | 1082 | @fwrite($this->connection, 'PWD' . "\r\n"); |
1082 | 1083 | $time = time(); |
1083 | - do |
|
1084 | - $response = fgets($this->connection, 1024); |
|
1084 | + do { |
|
1085 | + $response = fgets($this->connection, 1024); |
|
1086 | + } |
|
1085 | 1087 | while ($response[3] != ' ' && time() - $time < 5); |
1086 | 1088 | |
1087 | 1089 | // Check for 257! |
@@ -89,7 +89,9 @@ |
||
89 | 89 | <li><a href="#" onclick="showSSIBlock('ssi_quickSearch'); return false;">Quick Search Box</a></li> |
90 | 90 | <li><a href="#" onclick="showSSIBlock('ssi_recentAttachments'); return false;">Recent Attachments</a></li> |
91 | 91 | </ul> |
92 | - <?php if ($user_info['is_admin']) { ?> |
|
92 | + <?php if ($user_info['is_admin']) |
|
93 | +{ |
|
94 | +?> |
|
93 | 95 | <h3>Advanced Functions <img class="help" title="Functions that require additional tweaking, not just copy and paste." src="<?php echo $settings['images_url']; ?>/helptopics.png" alt=""></h3> |
94 | 96 | <ul> |
95 | 97 | <li><a href="#" onclick="showSSIBlock('ssi_showPoll'); return false;">Show Single Poll</a></li> |
@@ -310,7 +310,6 @@ discard block |
||
310 | 310 | $replacement .= $precedingStyle . $extra_attr . $afterStyle; |
311 | 311 | } |
312 | 312 | } |
313 | - |
|
314 | 313 | elseif (preg_match('~</([A-Za-z]+)>~', $part, $matches) === 1) |
315 | 314 | { |
316 | 315 | // Is this the element that we've been waiting for to be closed? |
@@ -570,7 +569,6 @@ discard block |
||
570 | 569 | $parts[$i + 2] = str_repeat("\t", $listDepth) . '[/list]'; |
571 | 570 | $parts[$i + 3] = ''; |
572 | 571 | } |
573 | - |
|
574 | 572 | else |
575 | 573 | { |
576 | 574 | // We're in a list item. |
@@ -609,7 +607,6 @@ discard block |
||
609 | 607 | $parts[$i + 2] = ''; |
610 | 608 | $parts[$i + 3] = ''; |
611 | 609 | } |
612 | - |
|
613 | 610 | else |
614 | 611 | { |
615 | 612 | // 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; |
@@ -1254,7 +1254,6 @@ |
||
1254 | 1254 | |
1255 | 1255 | return array($charset, $string, 'base64'); |
1256 | 1256 | } |
1257 | - |
|
1258 | 1257 | else |
1259 | 1258 | return array($charset, $string, '7bit'); |
1260 | 1259 | } |
@@ -1997,7 +1997,7 @@ |
||
1997 | 1997 | // Remove anything that isn't actually new from our list of files |
1998 | 1998 | foreach ($to_unset as $key => $ids) |
1999 | 1999 | { |
2000 | - if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true) |
|
2000 | + if (array_reduce($ids, function($carry, $item) { return $carry * $item; }, true) == true) |
|
2001 | 2001 | unset($smiley_files[$key]); |
2002 | 2002 | } |
2003 | 2003 |
@@ -1997,7 +1997,9 @@ |
||
1997 | 1997 | // Remove anything that isn't actually new from our list of files |
1998 | 1998 | foreach ($to_unset as $key => $ids) |
1999 | 1999 | { |
2000 | - if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true) |
|
2000 | + if (array_reduce($ids, function ($carry, $item) |
|
2001 | + { |
|
2002 | +return $carry * $item; }, true) == true) |
|
2001 | 2003 | unset($smiley_files[$key]); |
2002 | 2004 | } |
2003 | 2005 |
@@ -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 |