@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $str = ''; |
200 | 200 | |
201 | 201 | ftsearch_load_ignores(); |
202 | - for ($i = count($astr) - 1; $i >= 0; $i --) { |
|
202 | + for ($i = count($astr) - 1; $i >= 0; $i--) { |
|
203 | 203 | // ignore? |
204 | 204 | if (array_search(mb_strtolower($astr[$i]), $ftsearch_ignores) !== false) { |
205 | 205 | unset($astr[$i]); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | |
255 | 255 | // doppelte chars ersetzen |
256 | 256 | $ordZ = ord('z'); |
257 | - for ($c = ord('a'); $c <= $ordZ; $c ++) { |
|
257 | + for ($c = ord('a'); $c <= $ordZ; $c++) { |
|
258 | 258 | $old_str = ''; |
259 | 259 | while ($old_str !== $str) { |
260 | 260 | $old_str = $str; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | 'parent' => MNU_MAP |
81 | 81 | ]; |
82 | 82 | $menuitem[MNU_MAP]['subitems'][] = $menu_map; |
83 | - ++ $menu_map; |
|
83 | + ++$menu_map; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $rsSubmenu = sqlf("SELECT `id` FROM `sys_menu` WHERE `parent`=0 ORDER BY `parent` ASC, `position` ASC"); |
108 | 108 | while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) { |
109 | 109 | $aMenu[MNU_ROOT]['subitems'][$nPos] = $rSubmenu['id']; |
110 | - $nPos ++; |
|
110 | + $nPos++; |
|
111 | 111 | } |
112 | 112 | sql_free_result($rsSubmenu); |
113 | 113 | fwrite($f, "\n"); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | ); |
145 | 145 | while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) { |
146 | 146 | $aMenu[$r['id']]['subitems'][$nPos] = $rSubmenu['id']; |
147 | - $nPos ++; |
|
147 | + $nPos++; |
|
148 | 148 | } |
149 | 149 | sql_free_result($rsSubmenu); |
150 | 150 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | // TODO fix the following if statement, seems corrupted |
51 | 51 | if (strtolower( |
52 | 52 | substr( |
53 | - 'http' + strstr($_SERVER['REFERER'], '://'), |
|
53 | + 'http' +strstr($_SERVER['REFERER'], '://'), |
|
54 | 54 | 0, |
55 | 55 | strlen($opt['page']['absolute_http_url']) |
56 | 56 | ) |
@@ -80,7 +80,7 @@ |
||
80 | 80 | \set_php_locale(); |
81 | 81 | |
82 | 82 | if ($this->translate->t('INTERNAL_LANG', 'all', 'OcSmarty.class.php', '') !== $sLanguage) { |
83 | - echo 'setlocale() failed to set language to ' . $sLanguage ."\n"; |
|
83 | + echo 'setlocale() failed to set language to ' . $sLanguage . "\n"; |
|
84 | 84 | die("Is the translation of INTERNAL_LANG correct?\n"); |
85 | 85 | } |
86 | 86 |
@@ -241,7 +241,7 @@ |
||
241 | 241 | while ($nCurPos < mb_strlen($str)) { |
242 | 242 | $nNextSep = mb_strlen($str); |
243 | 243 | $sepLength = mb_strlen($sep); |
244 | - for ($nSepPos = 0; $nSepPos < $sepLength; $nSepPos ++) { |
|
244 | + for ($nSepPos = 0; $nSepPos < $sepLength; $nSepPos++) { |
|
245 | 245 | $nThisPos = mb_strpos($str, mb_substr($sep, $nSepPos, 1), $nCurPos); |
246 | 246 | if ($nThisPos !== false && $nNextSep > $nThisPos) { |
247 | 247 | $nNextSep = $nThisPos; |
@@ -464,9 +464,9 @@ |
||
464 | 464 | return false; |
465 | 465 | } else { |
466 | 466 | // restore picture file |
467 | - $this->setUrl($original_url); // set the url, so that we can |
|
467 | + $this->setUrl($original_url); // set the url, so that we can |
|
468 | 468 | $filename = $this->getFilename(); // .. retrieve the file path+name |
469 | - $this->setFilenames($filename); // now set url(s) from the new uuid |
|
469 | + $this->setFilenames($filename); // now set url(s) from the new uuid |
|
470 | 470 | try { |
471 | 471 | rename($this->deletedFilename($filename), $this->getFilename()); |
472 | 472 | } catch (Exception $e) { |
@@ -2322,8 +2322,7 @@ discard block |
||
2322 | 2322 | // Forcing conversion of input to UCS4 array |
2323 | 2323 | // If one time encoding is given, use this, else the objects property |
2324 | 2324 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2325 | - case 'utf8': |
|
2326 | - $decoded = $this->_utf8_to_ucs4($decoded); |
|
2325 | + case 'utf8' : $decoded = $this->_utf8_to_ucs4($decoded); |
|
2327 | 2326 | break; |
2328 | 2327 | case 'ucs4_string': |
2329 | 2328 | $decoded = $this->_ucs4_string_to_ucs4($decoded); |
@@ -2478,8 +2477,7 @@ discard block |
||
2478 | 2477 | // The output is UTF-8 by default, other output formats need conversion here |
2479 | 2478 | // If one time encoding is given, use this, else the objects property |
2480 | 2479 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2481 | - case 'utf8': |
|
2482 | - return $return; |
|
2480 | + case 'utf8' : return $return; |
|
2483 | 2481 | break; |
2484 | 2482 | case 'ucs4_string': |
2485 | 2483 | return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
@@ -2714,12 +2712,12 @@ discard block |
||
2714 | 2712 | break; |
2715 | 2713 | } |
2716 | 2714 | |
2717 | - $w = (int) ($w * ($this->_base - $t)); |
|
2715 | + $w = (int)($w * ($this->_base - $t)); |
|
2718 | 2716 | } |
2719 | 2717 | |
2720 | 2718 | $bias = $this->_adapt($idx - $old_idx, $deco_len + 1, $is_first); |
2721 | 2719 | $is_first = false; |
2722 | - $char += (int) ($idx / ($deco_len + 1)); |
|
2720 | + $char += (int)($idx / ($deco_len + 1)); |
|
2723 | 2721 | $idx %= ($deco_len + 1); |
2724 | 2722 | |
2725 | 2723 | if ($deco_len > 0) { |
@@ -2746,14 +2744,14 @@ discard block |
||
2746 | 2744 | */ |
2747 | 2745 | private function _adapt($delta, $npoints, $is_first) |
2748 | 2746 | { |
2749 | - $delta = (int) ($is_first ? ($delta / $this->_damp) : ($delta / 2)); |
|
2750 | - $delta += (int) ($delta / $npoints); |
|
2747 | + $delta = (int)($is_first ? ($delta / $this->_damp) : ($delta / 2)); |
|
2748 | + $delta += (int)($delta / $npoints); |
|
2751 | 2749 | |
2752 | 2750 | for ($k = 0; $delta > (($this->_base - $this->_tmin) * $this->_tmax) / 2; $k += $this->_base) { |
2753 | - $delta = (int) ($delta / ($this->_base - $this->_tmin)); |
|
2751 | + $delta = (int)($delta / ($this->_base - $this->_tmin)); |
|
2754 | 2752 | } |
2755 | 2753 | |
2756 | - return (int) ($k + ($this->_base - $this->_tmin + 1) * $delta / ($delta + $this->_skew)); |
|
2754 | + return (int)($k + ($this->_base - $this->_tmin + 1) * $delta / ($delta + $this->_skew)); |
|
2757 | 2755 | } |
2758 | 2756 | |
2759 | 2757 | /** |
@@ -2899,8 +2897,8 @@ discard block |
||
2899 | 2897 | |
2900 | 2898 | $result = []; |
2901 | 2899 | $T = $this->_tbase + $sindex % $this->_tcount; |
2902 | - $result[] = (int) ($this->_lbase + $sindex / $this->_ncount); |
|
2903 | - $result[] = (int) ($this->_vbase + ($sindex % $this->_ncount) / $this->_tcount); |
|
2900 | + $result[] = (int)($this->_lbase + $sindex / $this->_ncount); |
|
2901 | + $result[] = (int)($this->_vbase + ($sindex % $this->_ncount) / $this->_tcount); |
|
2904 | 2902 | |
2905 | 2903 | if ($T != $this->_tbase) { |
2906 | 2904 | $result[] = $T; |
@@ -3141,7 +3139,7 @@ discard block |
||
3141 | 3139 | throw new UnexpectedValueException('This might be UTF-8, but I don\'t understand it at byte ' . $k); |
3142 | 3140 | } |
3143 | 3141 | if ('add' == $mode) { |
3144 | - $output[$out_len] = (int) $v; |
|
3142 | + $output[$out_len] = (int)$v; |
|
3145 | 3143 | ++$out_len; |
3146 | 3144 | continue; |
3147 | 3145 | } |
@@ -3361,7 +3359,7 @@ discard block |
||
3361 | 3359 | return mb_strlen($string, '8bit'); |
3362 | 3360 | } |
3363 | 3361 | |
3364 | - return strlen((binary) $string); |
|
3362 | + return strlen((binary)$string); |
|
3365 | 3363 | } |
3366 | 3364 | |
3367 | 3365 | // }}}} |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | FROM field_note |
50 | 50 | WHERE `id` = &1 |
51 | 51 | AND `user_id` = &2', |
52 | - (int) $_GET['fieldnoteid'], |
|
53 | - (int) $user->getUserId() |
|
52 | + (int)$_GET['fieldnoteid'], |
|
53 | + (int)$user->getUserId() |
|
54 | 54 | ); |
55 | 55 | $fieldNote = sql_fetch_assoc($rs); |
56 | 56 | if (!empty($fieldNote)) { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | // get log text editor mode (from form or from userprofile) |
175 | 175 | // 1 = text; 2 = HTML; 3 = tinyMCE |
176 | 176 | if (isset($_POST['descMode'])) { |
177 | - $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
177 | + $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
178 | 178 | if (($descMode < 1) || ($descMode > 3)) { |
179 | 179 | $descMode = 3; |
180 | 180 | } |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | if (isset($_REQUEST['fieldnoteid']) && $_REQUEST['fieldnoteid']) { |
336 | 336 | sql( |
337 | 337 | 'DELETE FROM field_note WHERE `id` = &1 AND `user_id` = &2', |
338 | - (int) $_REQUEST['fieldnoteid'], |
|
338 | + (int)$_REQUEST['fieldnoteid'], |
|
339 | 339 | $user->getUserId() |
340 | 340 | ); |
341 | 341 |
@@ -300,7 +300,7 @@ |
||
300 | 300 | while ($r = sql_fetch_assoc($rs)) { |
301 | 301 | $user = new user($r['user_id']); |
302 | 302 | $user->sendRegistrationCode(); |
303 | - ++ $n; |
|
303 | + ++$n; |
|
304 | 304 | } |
305 | 305 | sql_free_result($rs); |
306 | 306 | self::message(0, $n . ' users have been re-sent the activation code'); |