@@ -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 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | "SELECT COUNT(*) |
102 | 102 | FROM `" . $table . "` |
103 | 103 | WHERE " . $this->getDateCondition($table, $dateField) . |
104 | - ($andWhere ? ' AND (' . $andWhere . ')' : ''), |
|
104 | + ($andWhere ? ' AND (' . $andWhere . ')' : ''), |
|
105 | 105 | 0 |
106 | 106 | ); |
107 | 107 | self::message(1, $objectCount . ' ' . $description); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $er->resendActivationCodes(); |
53 | 53 | break; |
54 | 54 | default: |
55 | - die('invalid option: '. $option . "\n"); |
|
55 | + die('invalid option: ' . $option . "\n"); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | while ($r = sql_fetch_assoc($rs)) { |
298 | 298 | $user = new user($r['user_id']); |
299 | 299 | $user->sendRegistrationCode(); |
300 | - ++ $n; |
|
300 | + ++$n; |
|
301 | 301 | } |
302 | 302 | sql_free_result($rs); |
303 | 303 | self::message(0, $n . ' users have been re-sent the activation code'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $year = substr($cache['date_created'], 0, 4); |
27 | 27 | if ($year >= 2005 && $year <= date("Y") && ($lat != 0 || $long != 0)) { |
28 | 28 | $years[$year] = true; |
29 | - $liste[$lat][$long]["caches"][$year] ++; |
|
29 | + $liste[$lat][$long]["caches"][$year]++; |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | mysql_free_result($rs); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $year = substr($cache["date"], 0, 4); |
51 | 51 | if ($year >= 2005 && $year <= date("Y") && ($lat != 0 || $long != 0)) { |
52 | 52 | $years[$year] = true; |
53 | - $liste[$lat][$long]["logs"][$year] ++; |
|
53 | + $liste[$lat][$long]["logs"][$year]++; |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | mysql_free_result($rs); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | while ($cache = sql_fetch_assoc($rs)) { |
68 | 68 | $lat = floor($cache["latitude"] / $grid); |
69 | 69 | $long = floor($cache["longitude"] / $grid); |
70 | - $liste[$lat][$long]["caches"]["all"] ++; |
|
70 | + $liste[$lat][$long]["caches"]["all"]++; |
|
71 | 71 | $liste[$lat][$long]["logs"]["all"] += $cache["logs"]; |
72 | 72 | } |
73 | 73 | mysql_free_result($rs); |