@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | global $sqldbg_cmdNo; |
156 | 156 | global $sqldbg_sumTimes; |
157 | 157 | |
158 | - $sqldbg_cmdNo ++; |
|
158 | + $sqldbg_cmdNo++; |
|
159 | 159 | |
160 | 160 | echo '<p class="sqlno"><span class="white">/*</span> SQL command ' . $sqldbg_cmdNo . ' '; |
161 | 161 | if ($bSlave) { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | while ($r = sql_fetch_assoc($rs)) { |
232 | 232 | $usebr = true; |
233 | - $nLine ++; |
|
233 | + $nLine++; |
|
234 | 234 | if ($bFirstLine == true) { |
235 | 235 | echo '<tr>' . "\n"; |
236 | 236 | foreach ($r as $field => $value) { |
@@ -148,7 +148,7 @@ |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
151 | - * @param $sql |
|
151 | + * @param string $sql |
|
152 | 152 | * @param $bSlave |
153 | 153 | * |
154 | 154 | * @return resource |
@@ -18,13 +18,13 @@ |
||
18 | 18 | * |
19 | 19 | ***************************************************************************/ |
20 | 20 | |
21 | -define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured |
|
22 | -define('LOGIN_OK', 0); // login succeeded |
|
23 | -define('LOGIN_BADUSERPW', 1); // bad username or password |
|
21 | +define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured |
|
22 | +define('LOGIN_OK', 0); // login succeeded |
|
23 | +define('LOGIN_BADUSERPW', 1); // bad username or password |
|
24 | 24 | define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
25 | 25 | define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked |
26 | 26 | define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty |
27 | -define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
27 | +define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
28 | 28 | |
29 | 29 | // login times in seconds |
30 | 30 | define('LOGIN_TIME', 60 * 60); |
@@ -14,8 +14,7 @@ |
||
14 | 14 | $tpl->caching = true; |
15 | 15 | $tpl->cache_lifetime = 3600; |
16 | 16 | |
17 | -$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : |
|
18 | - (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']); |
|
17 | +$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']); |
|
19 | 18 | |
20 | 19 | if (!$tpl->is_cached()) { |
21 | 20 | $newCaches = array(); |
@@ -75,11 +75,11 @@ |
||
75 | 75 | if (isset($_REQUEST['ok'])) { // Ocprop |
76 | 76 | $bError = false; |
77 | 77 | |
78 | - $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop |
|
79 | - $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop |
|
78 | + $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop |
|
79 | + $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop |
|
80 | 80 | $picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview'] == '1'); |
81 | 81 | |
82 | - $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop |
|
82 | + $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop |
|
83 | 83 | if ($title == '' || ($picture->getObjectType() == OBJECT_CACHELOG && trim($title) == '')) { |
84 | 84 | $tpl->assign('errortitle', true); |
85 | 85 | $bError = true; |
@@ -72,7 +72,7 @@ |
||
72 | 72 | if ($submit == true) { |
73 | 73 | $options = sql_value("SELECT `options` FROM `queries` WHERE `id`='&1'", false, $queryid); |
74 | 74 | if (!$options) { |
75 | - $tpl->error(ERROR_UNKNOWN); // query does not exist |
|
75 | + $tpl->error(ERROR_UNKNOWN); // query does not exist |
|
76 | 76 | } elseif ($sortby || $sortorder || $creationdate) { |
77 | 77 | $oa = unserialize($options); |
78 | 78 | if ($sortby) { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | foreach ($sendto as $receiver) { |
43 | 43 | $receiver = trim($receiver); |
44 | - echo ++ $n . "/$total: $receiver"; |
|
44 | + echo ++$n . "/$total: $receiver"; |
|
45 | 45 | mail( |
46 | 46 | $receiver, |
47 | 47 | $subject, |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | function test_encoding($path) |
43 | 43 | { |
44 | - static $ur_exclude = [ // no unicode reminder needed |
|
44 | + static $ur_exclude = [// no unicode reminder needed |
|
45 | 45 | 'lang/de/ocstyle/search1/search.result.caches', |
46 | 46 | 'lib2/b2evo-captcha', |
47 | 47 | 'lib2/HTMLPurifier', |
@@ -39,6 +39,9 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | |
42 | +/** |
|
43 | + * @param string $path |
|
44 | + */ |
|
42 | 45 | function testforbom($path) |
43 | 46 | { |
44 | 47 | $filestart = file_get_contents($path, false, null, 0, 2); |
@@ -108,19 +108,19 @@ discard block |
||
108 | 108 | && !preg_match("/^ *(\\*|\/\/|#) *\n$/", $line)) { |
109 | 109 | |
110 | 110 | $old_line = $line; |
111 | - $line = rtrim($line); # trims " \t\n\r\0\x0B" |
|
111 | + $line = rtrim($line); # trims " \t\n\r\0\x0B" |
|
112 | 112 | $line = $this->expandTabs($line); |
113 | 113 | $line .= "\n"; |
114 | 114 | |
115 | 115 | if ($line != $old_line) { |
116 | 116 | $file_modified = true; |
117 | - ++ $this->lines_modified; |
|
117 | + ++$this->lines_modified; |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | if (preg_match('/\<\?\s/', $line)) { # relies on \n at EOL |
121 | 121 | self::warn('short open tag in line ' . $n . ' of ' . $display_filepath); |
122 | 122 | } |
123 | - ++ $n; |
|
123 | + ++$n; |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | # remove PHP close tags and empty lines from end of file |
@@ -131,17 +131,17 @@ discard block |
||
131 | 131 | if ($trimmed_line == '?>' || $trimmed_line == '') { |
132 | 132 | unset($lines[$l]); |
133 | 133 | $file_modified = true; |
134 | - ++ $this->lines_modified; |
|
134 | + ++$this->lines_modified; |
|
135 | 135 | } else { |
136 | 136 | break; |
137 | 137 | } |
138 | - -- $l; |
|
138 | + --$l; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | if ($file_modified) { |
142 | 142 | echo 'cleaned ' . substr($filepath, 2) . "\n"; |
143 | 143 | file_put_contents($filepath, implode('', $lines)); |
144 | - ++ $this->files_modified; |
|
144 | + ++$this->files_modified; |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 |
@@ -31,9 +31,9 @@ |
||
31 | 31 | $lang |
32 | 32 | ); |
33 | 33 | } |
34 | - ++ $set; |
|
34 | + ++$set; |
|
35 | 35 | } |
36 | - if (++ $processed % 1000 == 0) { |
|
36 | + if (++$processed % 1000 == 0) { |
|
37 | 37 | echo "$set of $processed " . ($write ? '' : 'would be ') . "set\n"; |
38 | 38 | } |
39 | 39 | } |