@@ -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 |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | * @param $filename |
285 | 285 | * @param $maxLength |
286 | 286 | * |
287 | - * @return bool|string |
|
287 | + * @return false|string |
|
288 | 288 | */ |
289 | 289 | function read_file($filename, $maxLength = 4096) |
290 | 290 | { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | * |
454 | 454 | * @param $n |
455 | 455 | * |
456 | - * @return mixed|string |
|
456 | + * @return string |
|
457 | 457 | */ |
458 | 458 | function number1000($n) |
459 | 459 | { |
@@ -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; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ .'/settings-sample-vagrant.inc.php'; |
|
3 | +require_once __DIR__ . '/settings-sample-vagrant.inc.php'; |
|
4 | 4 | |
5 | 5 | // database access |
6 | 6 | $opt['db']['servername'] = '127.0.0.1'; |
@@ -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) { |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | } |
693 | 693 | |
694 | 694 | /** |
695 | - * @return bool|string |
|
695 | + * @return string|false |
|
696 | 696 | */ |
697 | 697 | public function getPageLink() |
698 | 698 | { |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | /** |
725 | 725 | * @param $tmpFile |
726 | 726 | * @param $longSideSize |
727 | - * @return bool |
|
727 | + * @return null|boolean |
|
728 | 728 | */ |
729 | 729 | public function rotate_and_shrink($tmpFile, $longSideSize) |
730 | 730 | { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | <?php |
155 | 155 | foreach ($opt['template']['locales'] AS $k => $lang) { |
156 | 156 | if ($lang['status'] == OC_LOCALE_ACTIVE) { |
157 | - echo '<a style="text-decoration: none;" href="'.$langUrl . $k . '"><img src="' . $lang['flag'] . |
|
157 | + echo '<a style="text-decoration: none;" href="' . $langUrl . $k . '"><img src="' . $lang['flag'] . |
|
158 | 158 | '" alt="' . $lang['name'] . '" title="' . $lang['name'] . '" width="24px" height="18px" /></a> '; |
159 | 159 | } |
160 | 160 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | $nLastGroup = $tpl_usercountries[$i]['group']; |
187 | 187 | |
188 | - echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry==$tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
188 | + echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry == $tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
189 | 189 | } |
190 | 190 | ?> |
191 | 191 | </select> |
@@ -506,6 +506,9 @@ |
||
506 | 506 | return mysql_fetch_assoc($rs); |
507 | 507 | } |
508 | 508 | |
509 | +/** |
|
510 | + * @param resource $rs |
|
511 | + */ |
|
509 | 512 | function sql_fetch_row($rs) |
510 | 513 | { |
511 | 514 | return mysql_fetch_row($rs); |
@@ -38,9 +38,9 @@ |
||
38 | 38 | mb_language('uni'); |
39 | 39 | |
40 | 40 | //load default webserver-settings and common includes |
41 | -require_once __DIR__ . '/consts.inc.php'; |
|
42 | -require_once __DIR__ . '/settings.inc.php'; |
|
43 | -require_once __DIR__ . '/../lib2/errorhandler.inc.php'; |
|
41 | +require_once __DIR__ . '/consts.inc.php'; |
|
42 | +require_once __DIR__ . '/settings.inc.php'; |
|
43 | +require_once __DIR__ . '/../lib2/errorhandler.inc.php'; |
|
44 | 44 | |
45 | 45 | // check for banned UAs |
46 | 46 | $useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ""; |