Completed
Pull Request — master (#300)
by
unknown
07:10
created
htdocs/lib2/Net/IDNA2/Exception/Nameprep.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . '/../Exception.php';
2
+require_once __DIR__.'/../Exception.php';
3 3
 // adjusted path for OC distribution
4 4
 
5 5
 class Net_IDNA2_Exception_Nameprep extends Net_IDNA2_Exception
Please login to merge, or discard this patch.
htdocs/lib2/ProcessSync.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function __construct($name)
17 17
     {
18 18
         global $opt;
19
-        $this->pidfile_path = $opt['rootpath'] . "cache2/$name.pid";
19
+        $this->pidfile_path = $opt['rootpath']."cache2/$name.pid";
20 20
     }
21 21
 
22 22
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         }
30 30
 
31 31
         if (file_exists($this->pidfile_path)) {
32
-            echo "Error: Pidfile (" . $this->pidfile_path . ") already present\n";
32
+            echo "Error: Pidfile (".$this->pidfile_path.") already present\n";
33 33
 
34 34
             return false;
35 35
         } else {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
                 return true;
41 41
             } else {
42
-                echo "can't create Pidfile " . $this->pidfile_path . "\n";
42
+                echo "can't create Pidfile ".$this->pidfile_path."\n";
43 43
 
44 44
                 return false;
45 45
             }
@@ -59,19 +59,19 @@  discard block
 block discarded – undo
59 59
 
60 60
             // bad PID file, e.g. due to system malfunction while creating the file?
61 61
             if ($pid_daemon <= 0) {
62
-                echo "removing bad pid_file (" . $this->pidfile_path . ")\n";
62
+                echo "removing bad pid_file (".$this->pidfile_path.")\n";
63 63
                 unlink($this->pidfile_path);
64 64
 
65 65
                 return false;
66 66
             } // process running?
67 67
             elseif (posix_kill($pid_daemon, 0)) {
68 68
                 // yes, good bye
69
-                echo "Error: process for " . $this->pidfile_path . " is already running with pid=$pid_daemon\n";
69
+                echo "Error: process for ".$this->pidfile_path." is already running with pid=$pid_daemon\n";
70 70
 
71 71
                 return false;
72 72
             } else {
73 73
                 // no, remove pid_file
74
-                echo "process not running, removing old pid_file (" . $this->pidfile_path . ")\n";
74
+                echo "process not running, removing old pid_file (".$this->pidfile_path.")\n";
75 75
                 unlink($this->pidfile_path);
76 76
 
77 77
                 return true;
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
                 unlink($this->pidfile_path);
94 94
             }
95 95
         } else {
96
-            echo "Error: can't delete own pidfile (" . $this->pidfile_path . ")\n";
96
+            echo "Error: can't delete own pidfile (".$this->pidfile_path.")\n";
97 97
         }
98 98
 
99 99
         if ($message) {
100
-            echo $message . "\n";
100
+            echo $message."\n";
101 101
         }
102 102
     }
103 103
 
Please login to merge, or discard this patch.
htdocs/lib2/web.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,23 +19,23 @@  discard block
 block discarded – undo
19 19
 }
20 20
 
21 21
 // chicken-egg problem ...
22
-require_once $opt['rootpath'] . 'lib2/const.inc.php';
22
+require_once $opt['rootpath'].'lib2/const.inc.php';
23 23
 
24 24
 // do all output in HTML format
25 25
 $opt['gui'] = GUI_HTML;
26 26
 
27 27
 // include the main library
28
-require_once $opt['rootpath'] . 'lib2/common.inc.php';
28
+require_once $opt['rootpath'].'lib2/common.inc.php';
29 29
 
30 30
 // enforce http or https?
31 31
 if ($opt['page']['https']['mode'] == HTTPS_DISABLED) {
32 32
     if ($opt['page']['https']['active']) {
33
-        $tpl->redirect('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
33
+        $tpl->redirect('http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
34 34
     }
35 35
     $opt['page']['force_https_login'] = false;
36 36
 } elseif ($opt['page']['https']['mode'] == HTTPS_ENFORCED) {
37 37
     if (!$opt['page']['https']['active']) {
38
-        $tpl->redirect('https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
38
+        $tpl->redirect('https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
39 39
     }
40 40
     $opt['page']['force_https_login'] = true;
41 41
 }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     if (substr($helppage, 0, 1) == "!") {
84 84
         substr($helppage, 1);
85 85
     } elseif ($helppage != "" && isset($opt['locale'][$help_locale]['helpwiki'])) {
86
-        return $opt['locale'][$help_locale]['helpwiki'] . str_replace(' ', '_', $helppage);
86
+        return $opt['locale'][$help_locale]['helpwiki'].str_replace(' ', '_', $helppage);
87 87
     } else {
88 88
         return "";
89 89
     }
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
         return "";
99 99
     } else {
100 100
         $imgtitle = $translate->t($title, '', basename(__FILE__), __LINE__);
101
-        $imgtitle = "alt='" . $imgtitle . "' title='" . $imgtitle . "'";
101
+        $imgtitle = "alt='".$imgtitle."' title='".$imgtitle."'";
102 102
 
103
-        return "<a class='nooutline' href='" . $helpurl . "' " . $imgtitle . " target='_blank'>";
103
+        return "<a class='nooutline' href='".$helpurl."' ".$imgtitle." target='_blank'>";
104 104
     }
105 105
 }
Please login to merge, or discard this patch.
htdocs/cachelist.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *  Shortcut for cachelist search
8 8
  ***************************************************************************/
9 9
 
10
-require __DIR__ . '/lib2/web.inc.php';
10
+require __DIR__.'/lib2/web.inc.php';
11 11
 
12 12
 $id = isset($_REQUEST['id']) ? $_REQUEST['id'] + 0 : 0;
13 13
 $password = isset($_REQUEST['key']) ? $_REQUEST['key'] : '';
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
         }
34 34
     }
35 35
 
36
-    $tpl->redirect("search.php?searchto=searchbylist&listid=" . $id .
37
-        ($password != "" ? "&listkey=" . urlencode($password) : "") .
38
-        "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname" . $invalid_waypoints);
36
+    $tpl->redirect("search.php?searchto=searchbylist&listid=".$id.
37
+        ($password != "" ? "&listkey=".urlencode($password) : "").
38
+        "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname".$invalid_waypoints);
39 39
 } else {
40 40
     $tpl->redirect("cachelists.php");
41 41
 }
Please login to merge, or discard this patch.
htdocs/mystatpic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require_once __DIR__ . '/./lib2/web.inc.php';
8
+require_once __DIR__.'/./lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'mystatpic';
11 11
 $tpl->menuitem = MNU_MYPROFILE_DATA_STATPIC;
Please login to merge, or discard this patch.
htdocs/query.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'query';
11 11
 $tpl->menuitem = MNU_MYPROFILE_QUERIES;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,8 @@
 block discarded – undo
39 39
 } elseif ($action == 'delete') {
40 40
     $queryid = isset($_REQUEST['queryid']) ? $_REQUEST['queryid'] + 0 : 0;
41 41
     deletequery($queryid);
42
-} else { // default: view
42
+} else {
43
+// default: view
43 44
     viewqueries();
44 45
 }
45 46
 
Please login to merge, or discard this patch.
htdocs/mailto.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'mailto';
11 11
 $tpl->menuitem = MNU_USER_MAILTO;
12 12
 
13 13
 $login->verify();
14 14
 if ($login->userid == 0) {
15
-    $tpl->redirect('login.php?target=' . urlencode($tpl->target));
15
+    $tpl->redirect('login.php?target='.urlencode($tpl->target));
16 16
 }
17 17
 
18 18
 $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0;
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     $wp = $_REQUEST['wp'];
37 37
     $cachename = trim(sql_value("SELECT `name` FROM `caches` WHERE `wp_oc`='&1'", '', $wp));
38 38
     if ($cachename) {
39
-        $subject = $translate->t('Your geocache', '', 0, 0) . ' "' . $cachename . '" (' . $wp . ')';
39
+        $subject = $translate->t('Your geocache', '', 0, 0).' "'.$cachename.'" ('.$wp.')';
40 40
     }
41 41
 } elseif (isset($_REQUEST['reportid']) && $login->admin) {
42 42
     $rs = sql(
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $_REQUEST['reportid']
48 48
     );
49 49
     if ($r = sql_fetch_assoc($rs)) {
50
-        $subject = $translate->t('Your geocache report for', '', 0, 0) . ' ' . $r['wp_oc'] . ' (' . $r['name'] . ')';
50
+        $subject = $translate->t('Your geocache report for', '', 0, 0).' '.$r['wp_oc'].' ('.$r['name'].')';
51 51
     }
52 52
     sql_free_result($rs);
53 53
 }
Please login to merge, or discard this patch.
htdocs/config2/settings-dist.inc.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 // database placeholder
109 109
 
110 110
 // productive database with opencaching-tables
111
-$opt['db']['placeholder']['db'] = '';    // selected by default
111
+$opt['db']['placeholder']['db'] = ''; // selected by default
112 112
 
113 113
 // empty database for temporary table creation
114 114
 $opt['db']['placeholder']['tmpdb'] = '';
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
 $opt['system']['maillog']['syslog_db_user'] = '';
123 123
 $opt['system']['maillog']['syslog_db_password'] = '';
124 124
 $opt['system']['maillog']['syslog_db_table'] = '';
125
-$opt['system']['maillog']['syslog_oc_host'] = '';  // 'host_name' column in syslog DB
126
-$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%';  // 'program' column in syslog DB
127
-$opt['system']['maillog']['column']['id'] = 'id';               // 'ID'
128
-$opt['system']['maillog']['column']['created'] = 'created';     // 'ReceivedAt'
125
+$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB
126
+$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB
127
+$opt['system']['maillog']['column']['id'] = 'id'; // 'ID'
128
+$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt'
129 129
 $opt['system']['maillog']['column']['host_name'] = 'host_name'; // 'FromHost'
130
-$opt['system']['maillog']['column']['message'] = 'message';     // 'Message'
131
-$opt['system']['maillog']['column']['program'] = 'program';     // 'SysLogTag'
132
-$opt['system']['maillog']['inactivity_warning'] = 30;   // warn after N days without new entries
130
+$opt['system']['maillog']['column']['message'] = 'message'; // 'Message'
131
+$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag'
132
+$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries
133 133
 
134 134
 /* cookie or session
135 135
  *
@@ -151,15 +151,15 @@  discard block
 block discarded – undo
151 151
  * 
152 152
  * other parameters may be customized
153 153
  */
154
-$opt['session']['mode'] = SAVE_COOKIE;     // don't change - other option "SAVE_SESSION" is not implemented properly
154
+$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly
155 155
 $opt['session']['cookiename'] = 'oc_devel'; // only with SAVE_COOKIE
156 156
 $opt['session']['path'] = '/';
157
-$opt['session']['domain'] = '';    // may be overwritten by $opt['domain'][...]['cookiedomain']
157
+$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain']
158 158
 
159 159
 /* maximum session lifetime
160 160
  */
161 161
 $opt['session']['expire']['cookie'] = 31536000; // when cookies used (default 1 year)
162
-$opt['session']['expire']['url'] = 1800;        // when no cookies used (default 30 min since last call), attention to session.js
162
+$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js
163 163
 
164 164
 /* If the Referer was sent by the client and the substring was not found,
165 165
  * the embedded session id will be marked as invalid.
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 /* other template options
186 186
  *
187 187
  */
188
-$opt['page']['origin_url'] = 'http://www.opencaching.de/';  // production installation for this OC site
188
+$opt['page']['origin_url'] = 'http://www.opencaching.de/'; // production installation for this OC site
189 189
 $opt['page']['develsystem'] = false;
190 190
 $opt['page']['teampic_url'] = 'http://www.opencaching.de/images/team/';
191 191
 $opt['page']['teammember_url'] = 'http://www.opencaching.de/';
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     'newcaches' => [
220 220
         'show' => true,
221 221
         'url' => 'http://www.opencaching.de',
222
-        'urlname' => '',  // optional: show other name than the url-domain
222
+        'urlname' => '', // optional: show other name than the url-domain
223 223
     ],
224 224
 ];
225 225
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 $opt['logic']['pictures']['dummy']['bgcolor'] = [255, 255, 255];
278 278
 $opt['logic']['pictures']['dummy']['text'] = '';
279 279
 $opt['logic']['pictures']['dummy']['textcolor'] = [0, 0, 0];
280
-$opt['logic']['pictures']['dummy']['replacepic'] = $opt['rootpath'] . 'images/';
280
+$opt['logic']['pictures']['dummy']['replacepic'] = $opt['rootpath'].'images/';
281 281
 
282 282
 /* cachemaps (obsolete)
283 283
  */
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 
380 380
 /* license-related functions
381 381
  */
382
-$opt['logic']['license']['newusers'] = 2;  // see license constants in lib2/logic/const.inc.php
382
+$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php
383 383
 $opt['logic']['license']['admin'] = true;
384 384
 $opt['logic']['license']['disclaimer'] = false;
385 385
 $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense';
@@ -387,18 +387,18 @@  discard block
 block discarded – undo
387 387
 
388 388
 /* optional APIs
389 389
  */
390
-$opt['logic']['api']['email_problems']['key'] = '';   // must be set to enable
391
-$opt['logic']['api']['user_inactivity']['key'] = '';  // must be set to enable
390
+$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable
391
+$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable
392 392
 
393 393
 /* cache report info settings
394 394
  */
395 395
 $opt['logic']['cache_reports']['delaydays'] = 2;
396
-$opt['logic']['cache_reports']['min_processperday'] = 5;   // set to 0 to disable
397
-$opt['logic']['cache_reports']['max_processperday'] = 20;  // set to 0 to disable
396
+$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable
397
+$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable
398 398
 
399 399
 /* cronjob
400 400
  */
401
-$opt['cron']['username'] = 'apache';   // system username for cronjobs
401
+$opt['cron']['username'] = 'apache'; // system username for cronjobs
402 402
 
403 403
 /* phpbb news integration (index.php, outdated)
404 404
  *
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 // a redirect to redirect-setting will be done
497 497
 // (use exact same url with slashes etc. as registered by garmin)
498 498
 $opt['lib']['garmin']['domain'] = 'www.site.org';
499
-$opt['lib']['garmin']['url'] = 'http://' . $opt['lib']['garmin']['domain'] . '/';
499
+$opt['lib']['garmin']['url'] = 'http://'.$opt['lib']['garmin']['domain'].'/';
500 500
 
501 501
 // if the plugin is not called from the correct domain, redirect to this site
502 502
 // (e.g. domain called without www. prefix) - must match domain of $opt['lib']['garmin']['url']
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 
525 525
 // max number of caches displayed in google maps
526 526
 if (isset($_SERVER['HTTP_USER_AGENT'])) {
527
-    $user_agent = " " . $_SERVER['HTTP_USER_AGENT'];
527
+    $user_agent = " ".$_SERVER['HTTP_USER_AGENT'];
528 528
     if (strpos($user_agent, "MSIE") && !strpos($user_agent, "Opera")) {
529 529
         $opt['map']['maxrecords'] = 200;
530 530
     } else {
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 /*
541 541
  * OKAPI
542 542
  */
543
-$opt['okapi']['var_dir'] = $opt['rootpath'] . 'var/okapi';
543
+$opt['okapi']['var_dir'] = $opt['rootpath'].'var/okapi';
544 544
 $opt['okapi']['github_access_token'] = null;
545 545
 
546 546
 /* Opencaching Node Daemon
Please login to merge, or discard this patch.
htdocs/config2/settings-sample.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
  * other parameters may be customized
67 67
  */
68 68
 $opt['session']['mode'] = SAVE_COOKIE;
69
-$opt['session']['cookiename'] = '<cookiename>';   // e.g. 'ocde'
70
-$opt['session']['domain'] = '<.do.main>';  // may be overwritten by $opt['domain'][...]['cookiedomain']
69
+$opt['session']['cookiename'] = '<cookiename>'; // e.g. 'ocde'
70
+$opt['session']['domain'] = '<.do.main>'; // may be overwritten by $opt['domain'][...]['cookiedomain']
71 71
 
72 72
 /* If the Referer was sent by the client and the substring was not found,
73 73
  * the embedded session id will be marked as invalid.
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 /* default locale
102 102
  */
103
-$opt['template']['default']['locale'] = 'DE';   // can be overwritten by $opt['domain'][<domain>]['locale']
103
+$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale']
104 104
 
105 105
 /* multi-domain settings
106 106
  *
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
  */
192 192
 $opt['lib']['garmin']['domain'] = '<domain>';
193 193
 $opt['lib']['garmin']['key'] = '00112233445566778899AABBCCDDEEFF00';
194
-$opt['lib']['garmin']['url'] = 'http://' . $opt['lib']['garmin']['domain'] . '/';
194
+$opt['lib']['garmin']['url'] = 'http://'.$opt['lib']['garmin']['domain'].'/';
195 195
 $opt['lib']['garmin']['page_url'] = 'http://<domain>/';
196 196
 
197 197
 // developer.what3words.com API Key
Please login to merge, or discard this patch.