Passed
Pull Request — master (#329)
by Mirko
07:45
created
htdocs/lib2/common.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
     ) {
278 278
         return 'https' . strstr($url, '://');
279 279
     } elseif (strtolower(substr($url, 0, strlen($opt['page']['absolute_https_url'])))
280
-                  == $opt['page']['absolute_https_url']
280
+                    == $opt['page']['absolute_https_url']
281 281
               && !$opt['page']['https']['active']
282 282
     ) {
283 283
         return 'http' . strstr($url, '://');
Please login to merge, or discard this patch.
htdocs/config2/locale.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
  *                 $opt['locale']
18 18
  ***************************************************************************/
19 19
 
20
-define('OC_LOCALE_ACTIVE', 2);    // enable language and show language button in header line
21
-define('OC_LOCALE_HIDDEN', 1);    // enable language but hide language button in header line
22
-define('OC_LOCALE_DISABLED', 0);  //  disable language
20
+define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line
21
+define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line
22
+define('OC_LOCALE_DISABLED', 0); //  disable language
23 23
 
24 24
 $opt['template']['locales']['DE']['status'] = OC_LOCALE_ACTIVE;
25 25
 $opt['template']['locales']['DE']['flag'] = 'images/flag/DE.png';
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 $opt['locale']['DE']['page']['license'] = '<a rel="license" href="%1"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="resource2/ocstyle/images/media/cc-by-nc-nd-small.png" /></a><div style="text-align:center; margin:8px 0 0 6px;">Die <a href="articles.php?page=impressum#datalicense">Inhalte</a> von {site} stehen unter der Creative-Commons-Lizenz <a rel="license" href="%1">BY-NC-ND 3.0 DE</a>.</div>';
132 132
 $opt['locale']['DE']['helpwiki'] = 'http://wiki.opencaching.de/index.php/';
133 133
 $opt['locale']['DE']['mostly_translated'] = true;
134
-$opt['locale']['DE']['what3words'] = true;  // "beta"
134
+$opt['locale']['DE']['what3words'] = true; // "beta"
135 135
 
136 136
 $opt['locale']['IT']['format']['dateshort'] = '%d/%m/%y';
137 137
 $opt['locale']['IT']['format']['dm'] = '%d/%m';
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 $opt['locale']['SV']['page']['subtitle1'] = 'Geocaching med Opencaching';
233 233
 $opt['locale']['SV']['page']['subtitle2'] = '';
234 234
 $opt['locale']['SV']['mostly_translated'] = false;
235
-$opt['locale']['SV']['what3words'] = true;  // "beta"
235
+$opt['locale']['SV']['what3words'] = true; // "beta"
236 236
 
237 237
 $opt['locale']['NO']['format']['dateshort'] = '%d.%m.%y';
238 238
 $opt['locale']['NO']['format']['dm'] = '%d.%m.';
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 $opt['locale']['RU']['format']['colonspace'] = '';
280 280
 $opt['locale']['RU']['country'] = 'RU';
281 281
 $opt['locale']['RU']['mostly_translated'] = false;
282
-$opt['locale']['RU']['what3words'] = true;   // "beta"
282
+$opt['locale']['RU']['what3words'] = true; // "beta"
283 283
 
284 284
 $opt['locale']['DA']['format']['dateshort'] = '%d.%m.%y';
285 285
 $opt['locale']['DA']['format']['dm'] = '%d.%m.';
Please login to merge, or discard this patch.
htdocs/lang/de/ocstyle/main.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
                                         }
176 176
                                         $nLastGroup = $tpl_usercountries[$i]['group'];
177 177
 
178
-                                        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>';
178
+                                        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>';
179 179
                                     }
180 180
 ?>
181 181
                                 </select>&nbsp;
Please login to merge, or discard this patch.
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -145,10 +145,11 @@  discard block
 block discarded – undo
145 145
                         <td><strong>{t}Language:{/t}&nbsp;</strong></td>
146 146
                         <td>
147 147
 <?php
148
-                            foreach ($opt['template']['locales'] AS $k => $lang)
149
-                                if ($lang['status'] == OC_LOCALE_ACTIVE)
148
+                            foreach ($opt['template']['locales'] AS $k => $lang) {
149
+                                                            if ($lang['status'] == OC_LOCALE_ACTIVE)
150 150
                                     echo '<a style="text-decoration: none;" href="index.php?locale=' . $k . '"><img src="' . $lang['flag'] . '" alt="' . $lang['name'] . '" title="' . $lang['name'] . '" width="24px" height="18px" /></a> ';
151
-?>
151
+                            }
152
+                            ?>
152 153
                         </td>
153 154
                         <td>&nbsp;&nbsp;&nbsp;&nbsp;<strong>{t}Country:{/t}&nbsp;</strong></td>
154 155
                         <td>
@@ -205,11 +206,12 @@  discard block
 block discarded – undo
205 206
                     <ul>
206 207
 <?php
207 208
                         // $pageidx is -1 e.g. when calling newcache.php as logged-off-user (-> login.tpl.php)
208
-                        if ($pageidx >= 0)
209
-                            mnu_EchoMainMenu($menu[$pageidx]['siteid']);
210
-                        else
211
-                            mnu_EchoMainMenu(-1);
212
-?>
209
+                        if ($pageidx >= 0) {
210
+                                                    mnu_EchoMainMenu($menu[$pageidx]['siteid']);
211
+                        } else {
212
+                                                    mnu_EchoMainMenu(-1);
213
+                        }
214
+                        ?>
213 215
                     </ul>
214 216
                 </div>
215 217
 
Please login to merge, or discard this patch.
htdocs/newdesc.php 1 patch
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 
45 45
                 //get the posted data
46 46
                 $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
47
-                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : '';  // Ocprop
47
+                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop
48 48
 
49
-                $hints = isset($_POST['hints']) ? $_POST['hints'] : '';  // Ocprop
50
-                $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;  // Ocprop
51
-                $desc = isset($_POST['desc']) ? $_POST['desc'] : '';  // Ocprop
49
+                $hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop
50
+                $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop
51
+                $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop
52 52
 
53 53
                 // read descMode; if not set, initialize from user profile
54 54
                 if (isset($_POST['descMode'])) {  // Ocprop
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                          WHERE `languages_list_default`.`lang`='" . sql_escape($locale) . "'
150 150
                          AND ISNULL(`cache_desc`.`cache_id`)",
151 151
                         0
152
-                    ) == 0 ) {
152
+                    ) == 0) {
153 153
                         $show_all_langs = 1;
154 154
                     }
155 155
                 }
@@ -199,8 +199,7 @@  discard block
 block discarded – undo
199 199
                 tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8'));
200 200
                 tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8'));
201 201
 
202
-                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message :
203
-                    (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
202
+                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
204 203
 
205 204
                 tpl_set_var('show_all_langs', $show_all_langs);
206 205
                 tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : '');
@@ -222,7 +221,7 @@  discard block
 block discarded – undo
222 221
                 $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
223 222
                 tpl_set_var('htmlheaders', $headers);
224 223
 
225
-                tpl_set_var('reset', $reset);  // obsolete
224
+                tpl_set_var('reset', $reset); // obsolete
226 225
                 tpl_set_var('submit', $submit);
227 226
             } else {
228 227
                 //TODO: not the owner
Please login to merge, or discard this patch.
local/devel/strip_private_data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,11 +63,11 @@
 block discarded – undo
63 63
 echo "clearing user data\n";
64 64
 sql('TRUNCATE `cache_adoption`');
65 65
 sql('TRUNCATE `cache_ignore`');
66
-sql('DELETE FROM `cache_lists` WHERE `is_public`<2');  // trigger deletes dependent data
66
+sql('DELETE FROM `cache_lists` WHERE `is_public`<2'); // trigger deletes dependent data
67 67
 sql('TRUNCATE `cache_list_bookmarks`');
68 68
 sql('TRUNCATE `cache_list_watches`');
69 69
 sql('TRUNCATE `cache_watches`');
70
-sql('DELETE FROM `coordinates` WHERE `type`=2');   // personal cache notes and coords
70
+sql('DELETE FROM `coordinates` WHERE `type`=2'); // personal cache notes and coords
71 71
 sql('TRUNCATE `queries`');
72 72
 sql('TRUNCATE `user_options`');
73 73
 sql(
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/autoarchive_caches.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
     public $name = 'autoarchive';
16 16
 
17
-    public $interval = 43200;  // twice per day
17
+    public $interval = 43200; // twice per day
18 18
 
19 19
 
20 20
     public function run()
Please login to merge, or discard this patch.
htdocs/util2/gns/mksearchindex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     foreach ($simpletextsarray as $text) {
28 28
         if ($text != '') {
29 29
             if (nonalpha($text)) {
30
-                die($r['uni'] . ' ' . $text . "\n");// obsolete for the same reason as above
30
+                die($r['uni'] . ' ' . $text . "\n"); // obsolete for the same reason as above
31 31
             }
32 32
 
33 33
             $simpletext = search_text2simple($text);
Please login to merge, or discard this patch.
htdocs/editcache.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 }
139 139
 
140 140
                 //here we read all used information from the form if submitted, otherwise from DB
141
-                $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']);  // Ocprop
141
+                $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop
142 142
                 $cache_type = isset($_POST['type']) ? $_POST['type'] : $cache_record['type'];
143 143
                 if (!isset($_POST['size'])) {
144 144
                     if ($cache_type == 4 || $cache_type == 5) {
@@ -152,15 +152,15 @@  discard block
 block discarded – undo
152 152
                 $cache_hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date(
153 153
                     'd',
154 154
                     strtotime($cache_record['date_hidden'])
155
-                );  // Ocprop
155
+                ); // Ocprop
156 156
                 $cache_hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date(
157 157
                     'm',
158 158
                     strtotime($cache_record['date_hidden'])
159
-                );  // Ocprop
159
+                ); // Ocprop
160 160
                 $cache_hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date(
161 161
                     'Y',
162 162
                     strtotime($cache_record['date_hidden'])
163
-                );  // Ocprop
163
+                ); // Ocprop
164 164
 
165 165
                 if (($cache_record['date_activate'] === null)) {
166 166
                     $cache_activate_day = isset($_POST['activate_day']) ? $_POST['activate_day'] : date('d');
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
                     );
187 187
                 }
188 188
 
189
-                $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty'];  // Ocprop
190
-                $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain'];  // Ocprop
191
-                $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country'];  // Ocprop
189
+                $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop
190
+                $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop
191
+                $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop
192 192
                 $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0;
193
-                $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status'];  // Ocprop
193
+                $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop
194 194
                 $status_old = $cache_record['status'];
195 195
                 $search_time = isset($_POST['search_time']) ? $_POST['search_time'] : $cache_record['search_time'];
196 196
                 $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length'];
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
                 $log_pw = isset($_POST['log_pw']) ? mb_substr($_POST['log_pw'], 0, 20) : $cache_record['logpw'];
252 252
                 // fix #4356: gc waypoints are frequently copy&pasted with leading spaces
253
-                $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc'];  // Ocprop
253
+                $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop
254 254
                 $showlists = isset($_POST['showlists']) ? 1 : $cache_record['show_cachelists'] + 0;
255 255
                 $protect_old_coords = isset($_POST['protect_old_coords']) ? 1 : $cache_record['protect_old_coords'] + 0;
256 256
 
@@ -262,12 +262,12 @@  discard block
 block discarded – undo
262 262
 
263 263
                 if (isset($_POST['latNS'])) {
264 264
                     //get coords from post-form
265
-                    $coords_latNS = $_POST['latNS'];  // Ocprop
266
-                    $coords_lonEW = $_POST['lonEW'];  // Ocprop
267
-                    $coords_lat_h = $_POST['lat_h'];  // Ocprop
268
-                    $coords_lon_h = $_POST['lon_h'];  // Ocprop
269
-                    $coords_lat_min = $_POST['lat_min'];  // Ocprop
270
-                    $coords_lon_min = $_POST['lon_min'];  // Ocprop
265
+                    $coords_latNS = $_POST['latNS']; // Ocprop
266
+                    $coords_lonEW = $_POST['lonEW']; // Ocprop
267
+                    $coords_lat_h = $_POST['lat_h']; // Ocprop
268
+                    $coords_lon_h = $_POST['lon_h']; // Ocprop
269
+                    $coords_lat_min = $_POST['lat_min']; // Ocprop
270
+                    $coords_lon_min = $_POST['lon_min']; // Ocprop
271 271
                 } else {
272 272
                     //get coords from DB
273 273
                     $coords_lon = $cache_record['longitude'];
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
                                     $logtype = 13;
565 565
                                     break;
566 566
                                 default:
567
-                                    $logtype = 0;  // ???
567
+                                    $logtype = 0; // ???
568 568
                             }
569 569
                             if ($logtype > 0) {
570 570
                                 sql(
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
                 tpl_set_var('showlists_checked', $showlists ? 'checked="checked"' : '');
1052 1052
                 tpl_set_var('protectcoords_checked', $protect_old_coords ? 'checked="checked"' : '');
1053 1053
 
1054
-                tpl_set_var('reset', $reset);  // obsolete
1054
+                tpl_set_var('reset', $reset); // obsolete
1055 1055
                 tpl_set_var('submit', $submit);
1056 1056
             } else {
1057 1057
                 //TODO: not the owner
Please login to merge, or discard this patch.
htdocs/lib/login.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.