@@ -28,7 +28,7 @@ |
||
28 | 28 | if ($count > 0) { |
29 | 29 | $formatter = new FormatterCoordinate(); |
30 | 30 | |
31 | - for ($i = 0; $i < $count; $i ++) { |
|
31 | + for ($i = 0; $i < $count; $i++) { |
|
32 | 32 | $waypoints[$i]['coord']['lat'] = $waypoints[$i]['coordinate']->latitude(); |
33 | 33 | $waypoints[$i]['coord']['lon'] = $waypoints[$i]['coordinate']->longitude(); |
34 | 34 | $waypoints[$i]['coordinateHtml'] = $formatter->formatHtml($waypoints[$i]['coordinate'], '<br />'); |
@@ -117,11 +117,11 @@ |
||
117 | 117 | /* maximum number of failed logins per hour before that IP address is blocked |
118 | 118 | * (used to prevent brute-force-attacks) |
119 | 119 | */ |
120 | -$opt['page']['max_logins_per_hour'] = 1000; // for development ... |
|
120 | +$opt['page']['max_logins_per_hour'] = 1000; // for development ... |
|
121 | 121 | $opt['page']['headoverlay'] = 'oc_head_alpha3'; |
122 | 122 | |
123 | 123 | // data license |
124 | -$opt['logic']['license']['disclaimer'] = true; // also in lib2/settings-dist.inc.php |
|
124 | +$opt['logic']['license']['disclaimer'] = true; // also in lib2/settings-dist.inc.php |
|
125 | 125 | $opt['logic']['license']['terms'] = $absolute_server_URI . 'articles.php?page=impressum#datalicense'; |
126 | 126 | |
127 | 127 | $opt['logic']['admin']['listingadmin_notification'] = 'root'; |
@@ -680,7 +680,7 @@ |
||
680 | 680 | |
681 | 681 | $str = $translate->t($str, '', basename(__FILE__), __LINE__); |
682 | 682 | $args = func_get_args(); |
683 | - for ($nIndex = count($args) - 1; $nIndex > 0; $nIndex --) { |
|
683 | + for ($nIndex = count($args) - 1; $nIndex > 0; $nIndex--) { |
|
684 | 684 | $str = str_replace('%' . $nIndex, $args[$nIndex], $str); |
685 | 685 | } |
686 | 686 |
@@ -7,10 +7,10 @@ |
||
7 | 7 | * common constant definitions of lib1 and lib2 |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -define('GUI_HTML', 0); // also defined in lib/consts.inc.php |
|
10 | +define('GUI_HTML', 0); // also defined in lib/consts.inc.php |
|
11 | 11 | define('GUI_TEXT', 1); |
12 | 12 | |
13 | -define('HTTPS_DISABLED', 0); // also defined in lib/consts.inc.php |
|
13 | +define('HTTPS_DISABLED', 0); // also defined in lib/consts.inc.php |
|
14 | 14 | define('HTTPS_ENABLED', 1); |
15 | 15 | define('HTTPS_ENFORCED', 2); |
16 | 16 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | // database names |
20 | 20 | $dbname = 'opencaching'; |
21 | -$tmpdbname = 'octmp'; // empty db with CREATE and DROP privileges |
|
21 | +$tmpdbname = 'octmp'; // empty db with CREATE and DROP privileges |
|
22 | 22 | |
23 | 23 | // common developer system settings |
24 | 24 | require 'settings-dev.inc.php'; |
@@ -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; |