Passed
Pull Request — master (#329)
by Mirko
07:45
created
htdocs/newcache.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         require_once $stylepath . '/' . $tplname . '.inc.php';
37 37
 
38 38
         //set template replacements
39
-        tpl_set_var('reset', $reset);  // obsolete
39
+        tpl_set_var('reset', $reset); // obsolete
40 40
         tpl_set_var('submit', $submit);
41 41
         tpl_set_var('general_message', '');
42 42
         tpl_set_var('hidden_since_message', '');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         tpl_set_var('diff_message', '');
54 54
         tpl_set_var('safari_message', '');
55 55
 
56
-        $sel_type = isset($_POST['type']) ? $_POST['type'] : 0;  // Ocprop
56
+        $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop
57 57
         if (!isset($_POST['size'])) {
58 58
             if ($sel_type == 4 || $sel_type == 5) {
59 59
                 $sel_size = 7;
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
                 $sel_size = -1;
62 62
             }
63 63
         } else {
64
-            $sel_size = isset($_POST['size']) ? $_POST['size'] : -1;  // Ocprop
64
+            $sel_size = isset($_POST['size']) ? $_POST['size'] : -1; // Ocprop
65 65
         }
66 66
         $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;
67
-        $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry();  // Ocprop
67
+        $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop
68 68
         $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0;
69 69
         $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
70 70
 
71 71
         //coords
72
-        $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW;  // Ocprop
72
+        $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop
73 73
         if ($lonEW == 'E') {
74 74
             tpl_set_var('lonEsel', ' selected="selected"');
75 75
             tpl_set_var('lonWsel', '');
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
             tpl_set_var('lonEsel', '');
78 78
             tpl_set_var('lonWsel', ' selected="selected"');
79 79
         }
80
-        $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0';  // Ocprop
80
+        $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop
81 81
         tpl_set_var('lon_h', htmlspecialchars($lon_h, ENT_COMPAT, 'UTF-8'));
82 82
 
83
-        $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000';  // Ocprop
83
+        $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop
84 84
         tpl_set_var('lon_min', htmlspecialchars($lon_min, ENT_COMPAT, 'UTF-8'));
85 85
 
86
-        $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS;  // Ocprop
86
+        $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop
87 87
         if ($latNS == 'N') {
88 88
             tpl_set_var('latNsel', ' selected="selected"');
89 89
             tpl_set_var('latSsel', '');
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
             tpl_set_var('latNsel', '');
92 92
             tpl_set_var('latSsel', ' selected="selected"');
93 93
         }
94
-        $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0';  // Ocprop
94
+        $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop
95 95
         tpl_set_var('lat_h', htmlspecialchars($lat_h, ENT_COMPAT, 'UTF-8'));
96 96
 
97
-        $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000';  // Ocprop
97
+        $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop
98 98
         tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8'));
99 99
 
100 100
         //name
101
-        $name = isset($_POST['name']) ? trim($_POST['name']) : '';  // Ocprop
101
+        $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop
102 102
         tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8'));
103 103
 
104 104
         //shortdesc
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         // fuer alte Versionen von OCProp
132 132
         if (isset($_POST['submit']) && !isset($_POST['version2'])) {
133
-            $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1;  // Ocprop
133
+            $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop
134 134
             $_POST['submitform'] = $_POST['submit'];
135 135
 
136 136
             $short_desc = iconv('ISO-8859-1', 'UTF-8', $short_desc);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         }
197 197
 
198 198
         //tos
199
-        $tos = isset($_POST['TOS']) ? 1 : 0;  // Ocprop
199
+        $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop
200 200
         if ($tos == 1) {
201 201
             tpl_set_var('toschecked', ' checked="checked"');
202 202
         } else {
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
         }
205 205
 
206 206
         //hidden_since
207
-        $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d');  // Ocprop
208
-        $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m');  // Ocprop
209
-        $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y');  // Ocprop
207
+        $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop
208
+        $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop
209
+        $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop
210 210
         tpl_set_var('hidden_day', htmlspecialchars($hidden_day, ENT_COMPAT, 'UTF-8'));
211 211
         tpl_set_var('hidden_month', htmlspecialchars($hidden_month, ENT_COMPAT, 'UTF-8'));
212 212
         tpl_set_var('hidden_year', htmlspecialchars($hidden_year, ENT_COMPAT, 'UTF-8'));
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         tpl_set_var('publish_later_checked', '');
224 224
         tpl_set_var('publish_notnow_checked', '');
225 225
 
226
-        $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2';  // Ocprop
226
+        $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop
227 227
         if ($publish == 'now2') {
228 228
             tpl_set_var('publish_now_checked', 'checked');
229 229
         } elseif ($publish == 'later') {
@@ -253,11 +253,11 @@  discard block
 block discarded – undo
253 253
 
254 254
         // gc- and nc-waypoints
255 255
         // fix #4356: gc waypoints are frequently copy&pasted with leading spaces
256
-        $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : '';  // Ocprop
256
+        $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop
257 257
         tpl_set_var('wp_gc', htmlspecialchars($wp_gc, ENT_COMPAT, 'UTF-8'));
258 258
 
259 259
         //difficulty
260
-        $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1;  // Ocprop
260
+        $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop
261 261
         $difficulty_options = '<option value="1">' . $sel_message . '</option>';
262 262
         for ($i = 2; $i <= 10; $i++) {
263 263
             if ($difficulty == $i) {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         tpl_set_var('difficulty_options', $difficulty_options);
271 271
 
272 272
         //terrain
273
-        $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1;  // Ocprop
273
+        $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop
274 274
         $terrain_options = '<option value="1">' . $sel_message . '</option>';
275 275
         for ($i = 2; $i <= 10; $i++) {
276 276
             if ($terrain == $i) {
Please login to merge, or discard this patch.
htdocs/lib2/logic/cacheIcon.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     public static function get($user_id, $cache_id, $cache_status, $cache_userid, $iconname)
12 12
     {
13
-        $iconname = mb_eregi_replace('cache/', '', $iconname);   // for old cache_type table contents
13
+        $iconname = mb_eregi_replace('cache/', '', $iconname); // for old cache_type table contents
14 14
         $iconext = '.' . mb_eregi_replace("^.*\.", '', $iconname);
15 15
         $iconname = mb_eregi_replace("\..*", '', $iconname);
16 16
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 break;
31 31
             case 5:
32 32
                 $iconname .= '-s';
33
-                break;      // fix for RT ticket #3403
33
+                break; // fix for RT ticket #3403
34 34
             case 6:
35 35
                 $iconname .= '-a';
36 36
                 break;
Please login to merge, or discard this patch.
htdocs/lib2/logic/logtypes.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -91,28 +91,28 @@
 block discarded – undo
91 91
 
92 92
     $allowed_logtypes = [];
93 93
     if ($owner || $admin_report || $admin_locked) {
94
-        $allowed_logtypes[] = 3;   // note
94
+        $allowed_logtypes[] = 3; // note
95 95
     }
96 96
     if (($owner && $statuslogs) || $admin_report) {
97 97
         if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin_report)) {
98
-            $allowed_logtypes[] = 10;  // ready for search
99
-            $allowed_logtypes[] = 11;  // temporarily not available
100
-            $allowed_logtypes[] = 9;   // archived
101
-            $allowed_logtypes[] = 13;  // locked
98
+            $allowed_logtypes[] = 10; // ready for search
99
+            $allowed_logtypes[] = 11; // temporarily not available
100
+            $allowed_logtypes[] = 9; // archived
101
+            $allowed_logtypes[] = 13; // locked
102 102
         }
103 103
         if ($admin_report || $old_logtype == 14) {
104 104
             $allowed_logtypes[] = 14;
105 105
         }  // locked, invisible
106 106
     }
107 107
     if ($cache_type == 6) { // event
108
-        $allowed_logtypes[] = 8;   // will attend
109
-        $allowed_logtypes[] = 7;   // attended
108
+        $allowed_logtypes[] = 8; // will attend
109
+        $allowed_logtypes[] = 7; // attended
110 110
     } else {
111
-        $allowed_logtypes[] = 1;   // found
112
-        $allowed_logtypes[] = 2;   // not found
111
+        $allowed_logtypes[] = 1; // found
112
+        $allowed_logtypes[] = 2; // not found
113 113
     }
114 114
     if (!($owner || $admin_report || $admin_locked)) {
115
-        $allowed_logtypes[] = 3;   // note
115
+        $allowed_logtypes[] = 3; // note
116 116
     }
117 117
 
118 118
     // always allow to keep the existing logtype when the log is edited by an admin
Please login to merge, or discard this patch.
htdocs/lib2/login.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
  *
21 21
  ***************************************************************************/
22 22
 
23
-define('LOGIN_UNKNOWN_ERROR', -1);     // unkown error occured
24
-define('LOGIN_OK', 0);                 // login succeeded
25
-define('LOGIN_BADUSERPW', 1);          // bad username or password
26
-define('LOGIN_TOOMUCHLOGINS', 2);      // too many logins in short time
27
-define('LOGIN_USERNOTACTIVE', 3);      // the useraccount locked
23
+define('LOGIN_UNKNOWN_ERROR', -1); // unkown error occured
24
+define('LOGIN_OK', 0); // login succeeded
25
+define('LOGIN_BADUSERPW', 1); // bad username or password
26
+define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time
27
+define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked
28 28
 define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty
29
-define('LOGIN_LOGOUT_OK', 5);          // logout was successfull
29
+define('LOGIN_LOGOUT_OK', 5); // logout was successfull
30 30
 
31 31
 // login times in seconds
32 32
 define('LOGIN_TIME', 60 * 60);
Please login to merge, or discard this patch.
htdocs/newlogs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     $tpl->cache_lifetime = 900;
70 70
     $tpl->cache_id = $exclude_country;
71 71
     $logcount = 250;
72
-    $paging = false;  // paging would have poor performance for all logs
72
+    $paging = false; // paging would have poor performance for all logs
73 73
     $orderByDate = $logselection == 3 ? '{fromtable}.`order_date` DESC, ' : '';
74 74
 } else {
75 75
     // latest logs for all countries or for one country
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     $tpl->cache_lifetime = 300;
89 89
     $tpl->cache_id = $country;
90 90
     $logcount = 250;
91
-    $paging = false;  // paging would have poor performance for all logs
91
+    $paging = false; // paging would have poor performance for all logs
92 92
     $orderByDate = $logselection == 3 ? '{fromtable}.`order_date` DESC, ' : '';
93 93
     $optimize_for_latest_logs = ($country == '' || $country == $opt['page']['main_country']);
94 94
 }
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/function.rand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  *
10 10
  * @return int
11 11
  */
12
-function smarty_function_rand(array $params, \OcSmarty &$smarty)
12
+function smarty_function_rand(array $params, \OcSmarty & $smarty)
13 13
 {
14 14
     $min = isset($params['min']) ? $params['min'] + 0 : 0;
15 15
     $max = isset($params['max']) ? $params['max'] + 0 : 0;
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/block.t.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
  *
58 58
  * @return string
59 59
  */
60
-function smarty_block_t(array $params, $text, \OcSmarty &$smarty, &$repeat)
60
+function smarty_block_t(array $params, $text, \OcSmarty & $smarty, &$repeat)
61 61
 {
62 62
     global $opt;
63 63
 
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/function.repeat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  *
8 8
  * @return string
9 9
  */
10
-function smarty_function_repeat(array $params, \OcSmarty &$smarty)
10
+function smarty_function_repeat(array $params, \OcSmarty & $smarty)
11 11
 {
12 12
     return str_repeat($params['string'], $params['count']);
13 13
 }
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/function.season.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  *
9 9
  * @return string
10 10
  */
11
-function smarty_function_season(array $params, \OcSmarty &$smarty)
11
+function smarty_function_season(array $params, \OcSmarty & $smarty)
12 12
 {
13 13
     $seasons = [];
14 14
 
Please login to merge, or discard this patch.