x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Completed
Pull Request — master (#314)
by Thomas
07:14
created
htdocs/lang/de/ocstyle/removelog.inc.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
         
16 16
  ****************************************************************************/
17 17
 
18
- $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.');
19
- $removed_message_end = '---';
18
+    $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.');
19
+    $removed_message_end = '---';
20 20
  
21 21
 
22 22
 function removed_log_subject($lang)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,5 +28,5 @@
 block discarded – undo
28 28
 function removed_message_title($lang)
29 29
 {
30 30
     global $translate;
31
-    return $translate->t('The owner of the cache has written the following comment to you:', '', basename(__FILE__), __LINE__, '', 1, $lang) . "\n---";
31
+    return $translate->t('The owner of the cache has written the following comment to you:', '', basename(__FILE__), __LINE__, '', 1, $lang)."\n---";
32 32
 }
Please login to merge, or discard this patch.
htdocs/lang/de/ocstyle/removedesc.inc.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      
16 16
  ****************************************************************************/
17 17
  
18
- $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.');
18
+    $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.');
19 19
 
20
- $commit = t('the cache description has been deleted');
21
- $commit_title = t('delete this cache-description');
20
+    $commit = t('the cache description has been deleted');
21
+    $commit_title = t('delete this cache-description');
Please login to merge, or discard this patch.
htdocs/lang/de/ocstyle/varset.inc.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 $error_suffix = '</span>';
72 72
 
73 73
 $htmlnotice =
74
- '<tr><td class="spacer" colspan="2"></td></tr>
74
+    '<tr><td class="spacer" colspan="2"></td></tr>
75 75
     <tr>
76 76
         <td class="help" colspan="2">
77 77
             <img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" alt="' . t('Notice') . '" title="' . t('Notice') . '" />
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,33 +22,33 @@  discard block
 block discarded – undo
22 22
 tpl_set_var('loginbox', '&nbsp;');
23 23
 tpl_set_var(
24 24
     'functionsbox',
25
-    '<a href="index.php?page=suche">' . t('Search') . '</a> | <a href="index.php?page=sitemap">' . t('Sitemap') . '</a>'
25
+    '<a href="index.php?page=suche">'.t('Search').'</a> | <a href="index.php?page=sitemap">'.t('Sitemap').'</a>'
26 26
 );
27 27
 tpl_set_var('runtime', '');
28 28
 
29 29
 //set up main template specific string
30
-$sLoggedOut = '<form action="' . ($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '') . 'login.php" method="post" enctype="application/x-www-form-urlencoded" name="login" dir="ltr" style="display: inline;"><b>' . t(
30
+$sLoggedOut = '<form action="'.($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '').'login.php" method="post" enctype="application/x-www-form-urlencoded" name="login" dir="ltr" style="display: inline;"><b>'.t(
31 31
         'User:'
32
-    ) . '</b>&nbsp;&nbsp;<input name="email" size="10" type="text" class="textboxes" value="" />&nbsp;&nbsp;&nbsp;<b>' . t(
32
+    ).'</b>&nbsp;&nbsp;<input name="email" size="10" type="text" class="textboxes" value="" />&nbsp;&nbsp;&nbsp;<b>'.t(
33 33
         'Password:'
34
-    ) . '</b>&nbsp;&nbsp;<input name="password" size="10" type="password" class="textboxes" value="" />&nbsp;<input type="hidden" name="action" value="login" /><input type="hidden" name="target" value="{target}" /><input type="hidden" name="source" value="titlebar" />&nbsp;<input type="submit" name="LogMeIn" value="' . t(
34
+    ).'</b>&nbsp;&nbsp;<input name="password" size="10" type="password" class="textboxes" value="" />&nbsp;<input type="hidden" name="action" value="login" /><input type="hidden" name="target" value="{target}" /><input type="hidden" name="source" value="titlebar" />&nbsp;<input type="submit" name="LogMeIn" value="'.t(
35 35
         'Login'
36
-    ) . '" class="formbutton" style="width: 74px;" onclick="submitbutton(\'LogMeIn\')" /></form>';
37
-$sLoggedIn = "<b>" . t(
36
+    ).'" class="formbutton" style="width: 74px;" onclick="submitbutton(\'LogMeIn\')" /></form>';
37
+$sLoggedIn = "<b>".t(
38 38
         'Logged in as'
39
-    ) . ' <a href="myhome.php" class="testing-top-left-corner-username">{username}</a></b> - <a href="login.php?action=logout">' . t(
39
+    ).' <a href="myhome.php" class="testing-top-left-corner-username">{username}</a></b> - <a href="login.php?action=logout">'.t(
40 40
         'Logout'
41
-    ) . '</a>';
41
+    ).'</a>';
42 42
 
43 43
 // target in Loginbox setzen
44
-$target = basename($_SERVER['PHP_SELF']) . '?';
44
+$target = basename($_SERVER['PHP_SELF']).'?';
45 45
 
46 46
 // REQUEST-Variablen durchlaufen und an target anhaengen
47 47
 $allowed = ['cacheid', 'userid', 'logid', 'desclang', 'descid'];
48 48
 reset($_REQUEST);
49 49
 while (list ($varname, $varvalue) = each($_REQUEST)) {
50 50
     if (in_array($varname, $allowed)) {
51
-        $target .= $varname . '=' . $varvalue . '&';
51
+        $target .= $varname.'='.$varvalue.'&';
52 52
     }
53 53
 }
54 54
 if (mb_substr($target, - 1) == '?' || mb_substr($target, - 1) == '&') {
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
  '<tr><td class="spacer" colspan="2"></td></tr>
75 75
     <tr>
76 76
         <td class="help" colspan="2">
77
-            <img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" alt="' . t('Notice') . '" title="' . t('Notice') . '" />
77
+            <img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" alt="' . t('Notice').'" title="'.t('Notice').'" />
78 78
             ' . t('Your HTML code will be changed again by a special filter. This is necessary to avoid dangerous HTML-tags,
79 79
                  such as &lt;script&gt;. A list of allowed HTML tags, you can find
80
-                 <a href="articles.php?page=htmltags">here</a>') . '
80
+                 <a href="articles.php?page=htmltags">here</a>').'
81 81
         </td>
82 82
     </tr>
83 83
     ';
Please login to merge, or discard this patch.
htdocs/lang/de/expressions.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 //common vars
23 23
 $dateformat = $opt['locale'][$locale]['format']['date'];
24
-$reset = t('Reset');  // obsolete
24
+$reset = t('Reset'); // obsolete
25 25
 $yes = t('Yes');
26 26
 $no = t('No');
27 27
 
Please login to merge, or discard this patch.
htdocs/ocstats.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,8 +17,9 @@
 block discarded – undo
17 17
 $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0;
18 18
 $lang = isset($_REQUEST['lang']) ? mb_strtoupper($_REQUEST['lang']) : $opt['template']['locale'];
19 19
 
20
-if (!isset($opt['locale'][$lang]))
20
+if (!isset($opt['locale'][$lang])) {
21 21
     $lang = $opt['template']['locale'];
22
+}
22 23
 
23 24
 $filename = GetFilename($userid, $lang);
24 25
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
  *  Create / redirect to statpic
8 8
  ***************************************************************************/
9 9
 
10
-require __DIR__ . '/lib2/web.inc.php';
10
+require __DIR__.'/lib2/web.inc.php';
11 11
 
12 12
 // Parameter
13 13
 $jpeg_qualitaet = 80;
14
-$fontfile = $opt['rootpath'] . 'resource2/' . $opt['template']['style'] . '/fonts/dejavu/ttf/DejaVuSans.ttf';
14
+$fontfile = $opt['rootpath'].'resource2/'.$opt['template']['style'].'/fonts/dejavu/ttf/DejaVuSans.ttf';
15 15
 
16 16
 // get userid and style from URL
17 17
 $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0;
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 
67 67
     if (sql_num_rows($rs) == 1) {
68 68
         $record = sql_fetch_array($rs);
69
-        $tplpath = $opt['rootpath'] . $record['tplpath'];
69
+        $tplpath = $opt['rootpath'].$record['tplpath'];
70 70
         $maxtextwidth = $record['maxtextwidth'];
71 71
     } else {
72
-        $tplpath = $opt['rootpath'] . 'images/ocstats1.gif';
72
+        $tplpath = $opt['rootpath'].'images/ocstats1.gif';
73 73
         $maxtextwidth = 60;
74 74
         $logo = 1;
75 75
     }
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
 }
171 171
 
172 172
 // Redirect auf das gespeicherte Bild
173
-$tpl->redirect('images/statpics/statpic' . $userid . $lang . '.jpg');
173
+$tpl->redirect('images/statpics/statpic'.$userid.$lang.'.jpg');
174 174
 
175 175
 function GetFilename($userid, $lang)
176 176
 {
177 177
     global $opt;
178 178
 
179
-    return $opt['rootpath'] . 'images/statpics/statpic' . $userid . $lang . '.jpg';
179
+    return $opt['rootpath'].'images/statpics/statpic'.$userid.$lang.'.jpg';
180 180
 }
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/purge_logs.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 class purge_logs
13 13
 {
14 14
     public $name = 'purge_logs';
15
-    public $interval = 86400;    // daily
15
+    public $interval = 86400; // daily
16 16
 
17 17
     public function run()
18 18
     {
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/maillog.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,8 @@  discard block
 block discarded – undo
112 112
                             $emailadr
113 113
                         );
114 114
                     } else {
115
-                        if ($bounced) // maximum one bounce per day is counted, to filter out temporary problems
115
+                        if ($bounced) {
116
+                            // maximum one bounce per day is counted, to filter out temporary problems
116 117
                         {
117 118
                             sql(
118 119
                                 "UPDATE `user` SET `email_problems`=`email_problems`+1, `last_email_problem`='&2'
@@ -121,6 +122,7 @@  discard block
 block discarded – undo
121 122
                                 $logentry['created']
122 123
                             );
123 124
                         }
125
+                        }
124 126
                     }
125 127
                 } else {
126 128
                     echo $this->name . ": no email address found for record ID " . $logentry['id'] . "\n";
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 class maillog
13 13
 {
14 14
     public $name = 'maillog';
15
-    public $interval = 600;  // every 10 minutes
15
+    public $interval = 600; // every 10 minutes
16 16
 
17 17
 
18 18
     public function run()
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
             $opt['system']['maillog']['syslog_db_user'],
34 34
             $opt['system']['maillog']['syslog_db_password'],
35 35
             true
36
-        );  // use separate connection even if on same DB host
36
+        ); // use separate connection even if on same DB host
37 37
         if ($dbc === false) {
38
-            echo $this->name . ": could not connect to syslog database\n";
38
+            echo $this->name.": could not connect to syslog database\n";
39 39
 
40 40
             return;
41 41
         }
42
-        if (@mysql_query("USE " . $opt['system']['maillog']['syslog_db_name'], $dbc) === false) {
43
-            echo $this->name . ": could not open syslog database: " . mysql_error() . "\n";
42
+        if (@mysql_query("USE ".$opt['system']['maillog']['syslog_db_name'], $dbc) === false) {
43
+            echo $this->name.": could not open syslog database: ".mysql_error()."\n";
44 44
 
45 45
             return;
46 46
         }
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
         $col_program = mysql_real_escape_string($opt['system']['maillog']['column']['program']);
53 53
 
54 54
         $maillog_where =
55
-            "`" . $col_hostname . "`='" . mysql_real_escape_string($opt['system']['maillog']['syslog_oc_host']) . "' AND
56
-            `" . $col_program . "` like '" . mysql_real_escape_string($opt['system']['maillog']['syslog_mta']) . "'";
55
+            "`".$col_hostname."`='".mysql_real_escape_string($opt['system']['maillog']['syslog_oc_host'])."' AND
56
+            `" . $col_program."` like '".mysql_real_escape_string($opt['system']['maillog']['syslog_mta'])."'";
57 57
 
58 58
         $rs = @mysql_query(
59 59
             "
60
-            SELECT TIMESTAMPDIFF(DAY, MAX(" . $col_created . "), NOW())
61
-            FROM `" . mysql_real_escape_string($opt['system']['maillog']['syslog_db_table']) . "`
60
+            SELECT TIMESTAMPDIFF(DAY, MAX(" . $col_created."), NOW())
61
+            FROM `" . mysql_real_escape_string($opt['system']['maillog']['syslog_db_table'])."`
62 62
             WHERE " . $maillog_where
63 63
         );
64 64
         $r = mysql_fetch_row($rs);
@@ -80,26 +80,26 @@  discard block
 block discarded – undo
80 80
         // case some entries with same timestamp as $last_date will be processed redundantly.
81 81
 
82 82
         $rs = @mysql_query(
83
-            "SELECT `" . $col_id . "` `id`,
84
-                      `" . $col_message . "` `message`,
85
-                      `" . $col_created . "` `created`
86
-                 FROM `" . mysql_real_escape_string($opt['system']['maillog']['syslog_db_table']) . "`
87
-                WHERE `" . $col_created . "`>='" . mysql_real_escape_string($last_date) . "'
88
-                  AND (`" . $col_id . "`>'" . mysql_real_escape_string(
83
+            "SELECT `".$col_id."` `id`,
84
+                      `" . $col_message."` `message`,
85
+                      `" . $col_created."` `created`
86
+                 FROM `" . mysql_real_escape_string($opt['system']['maillog']['syslog_db_table'])."`
87
+                WHERE `" . $col_created."`>='".mysql_real_escape_string($last_date)."'
88
+                  AND (`" . $col_id."`>'".mysql_real_escape_string(
89 89
                 $last_id
90
-            ) . "' OR `" . $col_created . "`>'" . mysql_real_escape_string($last_date) . "')
91
-                  AND  " . $maillog_where . "
92
-             ORDER BY `" . $col_created . "`,`" . $col_id . "`",
90
+            )."' OR `".$col_created."`>'".mysql_real_escape_string($last_date)."')
91
+                  AND  " . $maillog_where."
92
+             ORDER BY `" . $col_created."`,`".$col_id."`",
93 93
             $dbc
94 94
         );
95 95
         if ($rs === false) {
96
-            echo $this->name . ": syslog query error (" . mysql_errno() . "): " . mysql_error() . "\n";
96
+            echo $this->name.": syslog query error (".mysql_errno()."): ".mysql_error()."\n";
97 97
 
98 98
             return;
99 99
         }
100 100
 
101 101
         while ($logentry = mysql_fetch_assoc($rs)) {
102
-            $message = $logentry['message'];   // latin-1 charset
102
+            $message = $logentry['message']; // latin-1 charset
103 103
             $delivered = strpos($message, 'status=sent') > 0;
104 104
             $bounced = strpos($message, 'status=bounced') > 0;
105 105
             if ($delivered || $bounced) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         }
124 124
                     }
125 125
                 } else {
126
-                    echo $this->name . ": no email address found for record ID " . $logentry['id'] . "\n";
126
+                    echo $this->name.": no email address found for record ID ".$logentry['id']."\n";
127 127
                 }
128 128
             }
129 129
             $last_id = $logentry['id'];
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/slave_cleanup.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         }
29 29
         sql_free_result($rs);
30 30
 
31
-        $this->cleanup_slave(- 1);
31
+        $this->cleanup_slave(-1);
32 32
     }
33 33
 
34 34
     public function cleanup_slave($slaveId)
Please login to merge, or discard this patch.
htdocs/config2/locale.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
 $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>';
142 142
 $opt['locale']['DE']['helpwiki'] = 'http://wiki.opencaching.de/index.php/';
143 143
 $opt['locale']['DE']['mostly_translated'] = true;
144
-$opt['locale']['DE']['what3words'] = true;  // "beta"
144
+$opt['locale']['DE']['what3words'] = true; // "beta"
145 145
 
146 146
 $opt['locale']['IT']['format']['dateshort'] = '%d/%m/%y';
147 147
 $opt['locale']['IT']['format']['dm'] = '%d/%m';
Please login to merge, or discard this patch.