Completed
Branch master (84f4f1)
by Thomas
23:30
created
htdocs/lib2/common.inc.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
 mb_regex_encoding('UTF-8');
44 44
 
45 45
 // set options
46
-require_once __DIR__.'/../config2/settings-dist.inc.php';
47
-require_once __DIR__.'/../config2/settings.inc.php';
48
-require_once __DIR__.'/../config2/verify-settings.inc.php';
46
+require_once __DIR__ . '/../config2/settings-dist.inc.php';
47
+require_once __DIR__ . '/../config2/settings.inc.php';
48
+require_once __DIR__ . '/../config2/verify-settings.inc.php';
49 49
 
50 50
 foreach ($opt['page']['banned_user_agents'] as $ua) {
51 51
     if (strpos($useragent, $ua) !== false) {
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   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,8 +146,9 @@
 block discarded – undo
146 146
                         <td>
147 147
 <?php
148 148
                             foreach ($opt['template']['locales'] AS $k => $lang) {
149
-                                                            if ($lang['status'] == OC_LOCALE_ACTIVE)
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> ';
149
+                                                            if ($lang['status'] == OC_LOCALE_ACTIVE) {
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
                             ?>
153 154
                         </td>
Please login to merge, or discard this patch.
htdocs/newcache.php 1 patch
Spacing   +25 added lines, -25 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') {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         // fill activate hours
238 238
         $activate_hour = isset($_POST['activate_hour']) ? $_POST['activate_hour'] + 0 : date('H') + 0;
239 239
         $activation_hours = '';
240
-        for ($i = 0; $i <= 23; $i ++) {
240
+        for ($i = 0; $i <= 23; $i++) {
241 241
             if ($activate_hour == $i) {
242 242
                 $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>';
243 243
             } else {
@@ -253,13 +253,13 @@  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
-        for ($i = 2; $i <= 10; $i ++) {
262
+        for ($i = 2; $i <= 10; $i++) {
263 263
             if ($difficulty == $i) {
264 264
                 $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>';
265 265
             } else {
@@ -270,9 +270,9 @@  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
-        for ($i = 2; $i <= 10; $i ++) {
275
+        for ($i = 2; $i <= 10; $i++) {
276 276
             if ($terrain == $i) {
277 277
                 $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>';
278 278
             } else {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
                 $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line);
509 509
                 $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
510 510
                 $group_line .= $line;
511
-                $nLineAttrCount ++;
511
+                $nLineAttrCount++;
512 512
 
513 513
                 $line = $cache_attrib_js;
514 514
                 $line = mb_ereg_replace('{id}', $record['id'], $line);
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
                 );
904 904
 
905 905
                 // insert cache-attributes
906
-                for ($i = 0; $i < count($cache_attribs); $i ++) {
906
+                for ($i = 0; $i < count($cache_attribs); $i++) {
907 907
                     if (($cache_attribs[$i] + 0) > 0) {
908 908
                         sql(
909 909
                             "INSERT INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES ('&1', '&2')",
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.
htdocs/addtolist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 }
32 32
 $newlist_public = isset($_REQUEST['newlist_public']);
33 33
 $newlist_watch = isset($_REQUEST['newlist_watch']);
34
-$default_list = isset($_REQUEST['listid']) ? (int) $_REQUEST['listid'] : cachelist::getMyLastAddedToListId();
34
+$default_list = isset($_REQUEST['listid']) ? (int)$_REQUEST['listid'] : cachelist::getMyLastAddedToListId();
35 35
 
36 36
 if (isset($_REQUEST['save']) && isset($_REQUEST['listid'])) {
37 37
     $listid = $_REQUEST['listid'] + 0;
Please login to merge, or discard this patch.
htdocs/lib2/logic/const.inc.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 define('RE_TYPE_FLOAT', 5);
17 17
 define('RE_TYPE_DOUBLE', 6);
18 18
 
19
-define('RE_INSERT_NOTHING', 0);       //
20
-define('RE_INSERT_OVERWRITE', 1);     // ignore given values and use function
21
-define('RE_INSERT_IGNORE', 2);        // dont use this column on insert
19
+define('RE_INSERT_NOTHING', 0); //
20
+define('RE_INSERT_OVERWRITE', 1); // ignore given values and use function
21
+define('RE_INSERT_IGNORE', 2); // dont use this column on insert
22 22
 define('RE_INSERT_AUTOINCREMENT', 4); // column is an auto increment column
23
-define('RE_INSERT_AUTOUUID', 8);      // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
-define('RE_INSERT_NOW', 16);          // NOW()
23
+define('RE_INSERT_AUTOUUID', 8); // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
+define('RE_INSERT_NOW', 16); // NOW()
25 25
 
26 26
 define('EUROPEAN_LETTERS', 'A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ');
27 27
 // ASCII + ISO-8859-1 0xC0..0xFF
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
 define('REGEX_FIRST_NAME', REGEX_LAST_NAME);
32 32
 define('REGEX_STATPIC_TEXT', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$');
33 33
 
34
-define('ADMIN_TRANSLATE', 1);     // edit translation
35
-define('ADMIN_MAINTAINANCE', 2);  // check table etc.
36
-define('ADMIN_USER', 4);          // drop users, caches etc.
37
-define('ADMIN_NEWS', 8);          // obsolete / reserved
38
-define('ADMIN_RESTORE', 16);      // restore vandalized listings
39
-define('ADMIN_ROOT', 128 | 127);  // root + all previous rights
40
-define('ADMIN_LISTING', 1024);    // can edit any cache listings
34
+define('ADMIN_TRANSLATE', 1); // edit translation
35
+define('ADMIN_MAINTAINANCE', 2); // check table etc.
36
+define('ADMIN_USER', 4); // drop users, caches etc.
37
+define('ADMIN_NEWS', 8); // obsolete / reserved
38
+define('ADMIN_RESTORE', 16); // restore vandalized listings
39
+define('ADMIN_ROOT', 128 | 127); // root + all previous rights
40
+define('ADMIN_LISTING', 1024); // can edit any cache listings
41 41
 
42 42
 define('ATTRIB_SELECTED', 1);
43 43
 define('ATTRIB_UNSELECTED', 2);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 define('USR_OPT_GMZOOM', 1);
69 69
 define('USR_OPT_SHOWSTATS', 5);
70 70
 define('USR_OPT_MAP_MENU', 6);
71
-define('USR_OPT_MAP_OVERVIEW', 7);   // obsolete, no longer supported since Google Maps 3.22
71
+define('USR_OPT_MAP_OVERVIEW', 7); // obsolete, no longer supported since Google Maps 3.22
72 72
 define('USR_OPT_MAP_MAXCACHES', 8);
73 73
 define('USR_OPT_MAP_ICONSET', 9);
74 74
 define('USR_OPT_MAP_PREVIEW', 10);
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 // ID 15 was temporarily used and is reserved, see commit dda7ef0. Continue with 16.
80 80
 
81 81
 // user.data_license values
82
-define('OLD_DATA_LICSENSE', 0);                       // before deadline
83
-define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1);      // declined license
84
-define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2);      // accepted new license on registration
85
-define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3);     // did not decline license until deadline
86
-define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4);     // could not accept/decline because disabled
82
+define('OLD_DATA_LICSENSE', 0); // before deadline
83
+define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1); // declined license
84
+define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2); // accepted new license on registration
85
+define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3); // did not decline license until deadline
86
+define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4); // could not accept/decline because disabled
87 87
 
88 88
 //picture upload/resize parameters
89 89
 define('PICTURE_QUALITY', 85);
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';
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 $opt['locale']['SV']['page']['subtitle1'] = 'Geocaching med Opencaching';
234 234
 $opt['locale']['SV']['page']['subtitle2'] = '';
235 235
 $opt['locale']['SV']['mostly_translated'] = false;
236
-$opt['locale']['SV']['what3words'] = true;  // "beta"
236
+$opt['locale']['SV']['what3words'] = true; // "beta"
237 237
 
238 238
 $opt['locale']['NO']['format']['dateshort'] = '%d.%m.%y';
239 239
 $opt['locale']['NO']['format']['dm'] = '%d.%m.';
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 $opt['locale']['RU']['country'] = 'RU';
284 284
 $opt['locale']['RU']['primary_lang_of'] = ['RU'];
285 285
 $opt['locale']['RU']['mostly_translated'] = false;
286
-$opt['locale']['RU']['what3words'] = true;   // "beta"
286
+$opt['locale']['RU']['what3words'] = true; // "beta"
287 287
 
288 288
 $opt['locale']['DA']['format']['dateshort'] = '%d.%m.%y';
289 289
 $opt['locale']['DA']['format']['dm'] = '%d.%m.';
Please login to merge, or discard this patch.
htdocs/lib/settings-dist.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 
145 145
 /* default locale
146 146
  */
147
-$opt['template']['default']['locale'] = 'DE';   // can be overwritten by $opt['domain'][<domain>]['locale']
147
+$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale']
148 148
 
149 149
 // include all locale settings
150 150
 require_once $rootpath . 'config2/locale.inc.php';
Please login to merge, or discard this patch.
htdocs/lib/clicompatbase.inc.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
         // muss dieses & ersetzt werden, oder ist es escaped?
240 240
         $escapesCount = 0;
241 241
         while ((($nextarg - $escapesCount - 1) > 0) && (mb_substr($sql, $nextarg - $escapesCount - 1, 1) == '\\')) {
242
-            $escapesCount ++;
242
+            $escapesCount++;
243 243
         }
244 244
         if (($escapesCount % 2) == 1) {
245
-            $nextarg ++;
245
+            $nextarg++;
246 246
         } else {
247 247
             $nextchar = mb_substr($sql, $nextarg + 1, 1);
248 248
             if (is_numeric($nextchar)) {
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                 while (mb_ereg_match('^[0-9]{1}', $nextchar) == 1) {
254 254
                     $arg .= $nextchar;
255 255
 
256
-                    $arglength ++;
256
+                    $arglength++;
257 257
                     $nextchar = mb_substr($sql, $nextarg + $arglength + 1, 1);
258 258
                 }
259 259
 
@@ -285,13 +285,13 @@  discard block
 block discarded – undo
285 285
                         // Anführungszeichen weg machen und NULL einsetzen
286 286
                         $filtered_sql = mb_substr($filtered_sql, 0, mb_strlen($filtered_sql) - 1);
287 287
                         $filtered_sql .= 'NULL';
288
-                        $sqlpos ++;
288
+                        $sqlpos++;
289 289
                     } else {
290 290
                         $filtered_sql .= 'NULL';
291 291
                     }
292 292
                 }
293 293
 
294
-                $sqlpos ++;
294
+                $sqlpos++;
295 295
             } else {
296 296
                 $arglength = 0;
297 297
                 $arg = '';
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                 while (mb_ereg_match('^[a-zA-Z0-9]{1}', $nextchar) == 1) {
301 301
                     $arg .= $nextchar;
302 302
 
303
-                    $arglength ++;
303
+                    $arglength++;
304 304
                     $nextchar = mb_substr($sql, $nextarg + $arglength + 1, 1);
305 305
                 }
306 306
 
@@ -329,12 +329,12 @@  discard block
 block discarded – undo
329 329
         $escapesCount = 0;
330 330
         while ((($nextarg - $escapesCount - 1) > 0) &&
331 331
                (mb_substr($filtered_sql, $nextarg - $escapesCount - 1, 1) == '\\')) {
332
-            $escapesCount ++;
332
+            $escapesCount++;
333 333
         }
334 334
         if (($escapesCount % 2) == 0) {
335 335
             // \& ersetzen durch &
336 336
             $filtered_sql = mb_substr($filtered_sql, 0, $nextarg) . '&' . mb_substr($filtered_sql, $nextarg + 2);
337
-            $nextarg --;
337
+            $nextarg--;
338 338
         }
339 339
 
340 340
         $nextarg = mb_strpos($filtered_sql, '\&', $nextarg + 2);
Please login to merge, or discard this patch.
Doc Comments   +31 added lines patch added patch discarded remove patch
@@ -64,6 +64,12 @@  discard block
 block discarded – undo
64 64
 // prepare EMail-From
65 65
 $emailheaders = 'From: "' . $emailaddr . '" <' . $emailaddr . '>';
66 66
 
67
+/**
68
+ * @param string $module
69
+ * @param integer $eventid
70
+ * @param integer $objectid2
71
+ * @param string $logtext
72
+ */
67 73
 function logentry($module, $eventid, $userid, $objectid1, $objectid2, $logtext, $details)
68 74
 {
69 75
     sql(
@@ -104,6 +110,9 @@  discard block
 block discarded – undo
104 110
     sql_error();
105 111
 }
106 112
 
113
+/**
114
+ * @param string $sql
115
+ */
107 116
 function sqlValue($sql, $default)
108 117
 {
109 118
     $rs = sql($sql);
@@ -132,11 +141,21 @@  discard block
 block discarded – undo
132 141
     }
133 142
 }
134 143
 
144
+/**
145
+ * @param string $name
146
+ * @param string $default
147
+ *
148
+ * @return string
149
+ */
135 150
 function getSysConfig($name, $default)
136 151
 {
137 152
     return sqlValue('SELECT `value` FROM `sysconfig` WHERE `name`=\'' . sql_escape($name) . '\'', $default);
138 153
 }
139 154
 
155
+/**
156
+ * @param string $name
157
+ * @param string $value
158
+ */
140 159
 function setSysConfig($name, $value)
141 160
 {
142 161
     if (sqlValue('SELECT COUNT(*) FROM sysconfig WHERE name=\'' . sql_escape($name) . '\'', 0) == 1) {
@@ -448,6 +467,9 @@  discard block
 block discarded – undo
448 467
     die('sql_error');
449 468
 }
450 469
 
470
+/**
471
+ * @param string $warnmessage
472
+ */
451 473
 function sql_warn($warnmessage)
452 474
 {
453 475
     global $sql_errormail;
@@ -470,6 +492,9 @@  discard block
 block discarded – undo
470 492
 /*
471 493
     Ersatz für die in Mysql eingebauten Funktionen
472 494
 */
495
+/**
496
+ * @param resource $rs
497
+ */
473 498
 function sql_fetch_array($rs)
474 499
 {
475 500
     return mysql_fetch_array($rs);
@@ -485,6 +510,9 @@  discard block
 block discarded – undo
485 510
     return mysql_fetch_row($rs);
486 511
 }
487 512
 
513
+/**
514
+ * @param resource $rs
515
+ */
488 516
 function sql_fetch_column($rs)
489 517
 {
490 518
     $col = [];
@@ -694,6 +722,9 @@  discard block
 block discarded – undo
694 722
     ];
695 723
 }
696 724
 
725
+/**
726
+ * @param string $filename
727
+ */
697 728
 function fetch_email_template($filename, $language, $domain)
698 729
 {
699 730
     global $opt, $rootpath;
Please login to merge, or discard this patch.