Completed
Pull Request — master (#314)
by Thomas
07:14
created
htdocs/okapi_settings.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@  discard block
 block discarded – undo
16 16
     # [3] http://code.google.com/p/opencaching-api/issues/detail?id=132
17 17
 
18 18
     $opt['rootpath'] = $GLOBALS['rootpath'];
19
-    require $opt['rootpath'] . 'lib2/const.inc.php';   # (into the *local* scope!)
20
-    require $opt['rootpath'] . 'config2/settings-dist.inc.php';
21
-    require $opt['rootpath'] . 'config2/settings.inc.php';
19
+    require $opt['rootpath'].'lib2/const.inc.php'; # (into the *local* scope!)
20
+    require $opt['rootpath'].'config2/settings-dist.inc.php';
21
+    require $opt['rootpath'].'config2/settings.inc.php';
22 22
     
23 23
     return array(
24 24
 
25 25
         # Settings which ARE NOT present in settings.inc.php:
26 26
 
27
-        'OC_BRANCH' => 'oc.de',  # Tell OKAPI to work in "OCDE mode".
27
+        'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode".
28 28
 
29 29
         # Settings which ARE present in settings.inc.php:
30 30
 
31 31
         'ADMINS'           => array($opt['db']['warn']['mail'], '[email protected]'),
32 32
         'FROM_FIELD'       => $opt['mail']['contact'],
33
-        'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'],
33
+        'DATA_LICENSE_URL' => $opt['page']['absolute_url'].$opt['logic']['license']['terms'],
34 34
         'DEBUG'            => ($opt['debug'] & DEBUG_DEVELOPER != 0),
35 35
         'DEBUG_PREVENT_SEMAPHORES'
36
-                           => !$opt['php']['semaphores'],  # not available on old developer system
36
+                           => !$opt['php']['semaphores'], # not available on old developer system
37 37
         'DB_SERVER'        => $opt['db']['servername'],
38 38
         'DB_NAME'          => $opt['db']['placeholder']['db'],
39 39
         'DB_USERNAME'      => $opt['db']['username'],
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
         'TIMEZONE'         => $opt['php']['timezone'],
44 44
         'SITE_URL'         => $opt['page']['absolute_url'],
45 45
         'REGISTRATION_URL' => $opt['page']['https']['mode'] != HTTPS_DISABLED
46
-                                  ? 'https://' . $opt['page']['domain'] . '/register.php'
47
-                                  : $opt['page']['absolute_url'] . 'register.php',
46
+                                  ? 'https://'.$opt['page']['domain'].'/register.php'
47
+                                  : $opt['page']['absolute_url'].'register.php',
48 48
         'VAR_DIR'          => $opt['okapi']['var_dir'],
49 49
         'IMAGES_DIR'       => rtrim($opt['logic']['pictures']['dir'], '/'),
50 50
         'IMAGES_URL'       => rtrim($opt['logic']['pictures']['url'], '/').'/',
51 51
         'IMAGE_MAX_UPLOAD_SIZE' => 2 * $opt['logic']['pictures']['maxsize'],
52
-        'IMAGE_MAX_PIXEL_COUNT' => 786432,  # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings
53
-        'SITE_LOGO'        => $opt['page']['absolute_url'] . 'resource2/' . $opt['template']['default']['style'] . '/images/oclogo/oc_logo_alpha3.png',
52
+        'IMAGE_MAX_PIXEL_COUNT' => 786432, # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings
53
+        'SITE_LOGO'        => $opt['page']['absolute_url'].'resource2/'.$opt['template']['default']['style'].'/images/oclogo/oc_logo_alpha3.png',
54 54
         'OC_NODE_ID'       => $opt['logic']['node']['id'],
55
-        'OC_COOKIE_NAME'   => $opt['session']['cookiename'] . 'data',
55
+        'OC_COOKIE_NAME'   => $opt['session']['cookiename'].'data',
56 56
         'OCDE_HTML_PURIFIER_SETTINGS'
57 57
                            => $opt['html_purifier'],
58 58
         'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'],
Please login to merge, or discard this patch.
htdocs/a.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,4 +7,4 @@
 block discarded – undo
7 7
  *  Activation page shortcut to keep URLs in activation Emails short
8 8
  ***************************************************************************/
9 9
 
10
-require __DIR__ . '/activation.php';
10
+require __DIR__.'/activation.php';
Please login to merge, or discard this patch.
htdocs/log.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
 }
12 12
 
13 13
 // include librarys
14
-require __DIR__ . '/lib2/web.inc.php';
15
-require_once __DIR__ . '/lib2/logic/cache.class.php';
16
-require_once __DIR__ . '/lib2/logic/user.class.php';
17
-require_once __DIR__ . '/lib2/logic/cachelog.class.php';
18
-require_once __DIR__ . '/lib2/edithelper.inc.php';
14
+require __DIR__.'/lib2/web.inc.php';
15
+require_once __DIR__.'/lib2/logic/cache.class.php';
16
+require_once __DIR__.'/lib2/logic/user.class.php';
17
+require_once __DIR__.'/lib2/logic/cachelog.class.php';
18
+require_once __DIR__.'/lib2/edithelper.inc.php';
19 19
 
20 20
 // prepare template and menue
21 21
 $tpl->name = 'log_cache';
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     // get logtext editormode (from form or from userprofile)
122 122
     // 1 = text; 2 = HTML; 3 = tinyMCE
123 123
     if (isset($_POST['descMode'])) {
124
-        $descMode = $_POST['descMode'] + 0;  // Ocprop: 2
124
+        $descMode = $_POST['descMode'] + 0; // Ocprop: 2
125 125
         if (($descMode < 1) || ($descMode > 3)) {
126 126
             $descMode = 3;
127 127
         }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     if ($descMode == 3) {
147 147
         $tpl->add_header_javascript('resource2/tinymce/tiny_mce_gzip.js');
148 148
         $tpl->add_header_javascript(
149
-            'resource2/tinymce/config/log.js.php?lang=' . strtolower($opt['template']['locale'])
149
+            'resource2/tinymce/config/log.js.php?lang='.strtolower($opt['template']['locale'])
150 150
         );
151 151
     }
152 152
     $tpl->add_header_javascript(editorJsPath());
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     if (is_numeric($logDateMonth)
159 159
         && is_numeric($logDateDay)
160 160
         && is_numeric($logDateYear)
161
-        && ($logTimeHour . $logTimeMinute == "" || is_numeric($logTimeHour))
161
+        && ($logTimeHour.$logTimeMinute == "" || is_numeric($logTimeHour))
162 162
         && ($logTimeMinute == "" || is_numeric($logTimeMinute))
163 163
     ) {
164 164
         $validate['dateOk'] = checkdate($logDateMonth, $logDateDay, $logDateYear)
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
          * set seconds 00:00:01, means "00:00 was logged"
224 224
          * set seconds 00:00:00, means "no time was logged"
225 225
          */
226
-        $logTimeSecond = ($logTimeHour . $logTimeMinute != ""
226
+        $logTimeSecond = ($logTimeHour.$logTimeMinute != ""
227 227
                 && $logTimeHour == 0
228 228
                 && $logTimeMinute == 0) + 0;
229 229
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         }
280 280
 
281 281
         // finished, redirect to listing
282
-        $tpl->redirect('viewcache.php?cacheid=' . $cache->getCacheId());
282
+        $tpl->redirect('viewcache.php?cacheid='.$cache->getCacheId());
283 283
     }
284 284
 
285 285
     // assign values to template
Please login to merge, or discard this patch.
htdocs/resource2/ocstyle/images/head/rotator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 $img = null;
160 160
 
161 161
 if (substr($folder, - 1) != '/') {
162
-    $folder = $folder . '/';
162
+    $folder = $folder.'/';
163 163
 }
164 164
 
165 165
 $fileList = [];
@@ -177,22 +177,22 @@  discard block
 block discarded – undo
177 177
 
178 178
 if (count($fileList) > 0) {
179 179
     $imageNumber = floor(time() / $interval) % count($fileList);
180
-    $img = $folder . $fileList[$imageNumber];
180
+    $img = $folder.$fileList[$imageNumber];
181 181
 }
182 182
 
183 183
 if ($img != null) {
184 184
     $imageInfo = pathinfo($img);
185
-    header('Content-type: ' . $extList[$imageInfo['extension']]);
185
+    header('Content-type: '.$extList[$imageInfo['extension']]);
186 186
 
187 187
     // Cache-Lebensdauer (in Minuten)
188
-    $exp_gmt = gmdate("D, d M Y H:i:s", time() + $interval) . " GMT";
189
-    $mod_gmt = gmdate("D, d M Y H:i:s", time()) . " GMT";
188
+    $exp_gmt = gmdate("D, d M Y H:i:s", time() + $interval)." GMT";
189
+    $mod_gmt = gmdate("D, d M Y H:i:s", time())." GMT";
190 190
 
191
-    header("Expires: " . $exp_gmt);
192
-    header("Last-Modified: " . $mod_gmt);
193
-    header("Cache-Control: public, max-age=" . $interval);
191
+    header("Expires: ".$exp_gmt);
192
+    header("Last-Modified: ".$mod_gmt);
193
+    header("Cache-Control: public, max-age=".$interval);
194 194
     // Speziell f�r MSIE 5
195
-    header("Cache-Control: pre-check=" . $interval, false);
195
+    header("Cache-Control: pre-check=".$interval, false);
196 196
 
197 197
     readfile($img);
198 198
 } else {
Please login to merge, or discard this patch.
htdocs/ocmap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,4 +6,4 @@
 block discarded – undo
6 6
  ***************************************************************************/
7 7
 
8 8
 $nongc = true;
9
-require __DIR__ . '/map2.php';
9
+require __DIR__.'/map2.php';
Please login to merge, or discard this patch.
htdocs/viewcache.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 use Oc\Libse\Http\RequestHttp;
15 15
 use Oc\Libse\Language\TranslatorLanguage;
16 16
 
17
-require __DIR__ . '/lib2/web.inc.php';
18
-require_once __DIR__ . '/lib2/logic/labels.inc.php';
17
+require __DIR__.'/lib2/web.inc.php';
18
+require_once __DIR__.'/lib2/logic/labels.inc.php';
19 19
 
20 20
 $login->verify();
21 21
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     if ($count > 0) {
29 29
         $formatter = new FormatterCoordinate();
30 30
 
31
-        for ($i = 0; $i < $count; $i ++) {
31
+        for ($i = 0; $i < $count; $i++) {
32 32
             $waypoints[$i]['coord']['lat'] = $waypoints[$i]['coordinate']->latitude();
33 33
             $waypoints[$i]['coord']['lon'] = $waypoints[$i]['coordinate']->longitude();
34 34
             $waypoints[$i]['coordinateHtml'] = $formatter->formatHtml($waypoints[$i]['coordinate'], '<br />');
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
 
79 79
 $desclang = isset($_REQUEST['desclang']) ? $_REQUEST['desclang'] : false;
80 80
 if ($desclang) {
81
-    $sPreferedDescLang = $_REQUEST['desclang'] . ',' . $opt['template']['locale'] . ',EN';
81
+    $sPreferedDescLang = $_REQUEST['desclang'].','.$opt['template']['locale'].',EN';
82 82
 } else {
83
-    $sPreferedDescLang = $opt['template']['locale'] . ',EN';
83
+    $sPreferedDescLang = $opt['template']['locale'].',EN';
84 84
 }
85 85
 
86 86
 $logpics = isset($_REQUEST['logpics']) && ($_REQUEST['logpics'] == 1);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $digits = 0;
204 204
     }
205 205
 }
206
-$rCache['waylength'] = sprintf('%.' . $digits . 'f', $rCache['waylength']);
206
+$rCache['waylength'] = sprintf('%.'.$digits.'f', $rCache['waylength']);
207 207
 
208 208
 // replace links
209 209
 $rCache['desc'] = use_current_protocol_in_html($rCache['desc']);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 }
244 244
 
245 245
 $tpl->assign('cache', $rCache);
246
-$tpl->title = $rCache['wpoc'] . ' ' . $rCache['name'];
246
+$tpl->title = $rCache['wpoc'].' '.$rCache['name'];
247 247
 
248 248
 $coord = new coordinate($rCache['latitude'], $rCache['longitude']);
249 249
 $tpl->assign('coordinates', $coord->getDecimalMinutes());
@@ -391,11 +391,11 @@  discard block
 block discarded – undo
391 391
  */
392 392
 $tpl->assign('show_logpics', $logpics ? 1 : 0);
393 393
 if ($logpics) {
394
-    LogPics::setPaging(LogPics::FOR_CACHE_GALLERY, 0, $cacheid, "viewcache.php?cacheid=" . $cacheid . "&logpics=1");
394
+    LogPics::setPaging(LogPics::FOR_CACHE_GALLERY, 0, $cacheid, "viewcache.php?cacheid=".$cacheid."&logpics=1");
395 395
     $tpl->assign(
396 396
         'subtitle',
397
-        "&lt;&lt; <a href='viewcache.php?cacheid=" . $cacheid . "'>" .
398
-        $translate->t('Back to the cache description', '', basename(__FILE__), __LINE__) . "</a>"
397
+        "&lt;&lt; <a href='viewcache.php?cacheid=".$cacheid."'>".
398
+        $translate->t('Back to the cache description', '', basename(__FILE__), __LINE__)."</a>"
399 399
     );
400 400
 
401 401
 } else {
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 }
425 425
 
426 426
 $cachemap['iframe'] = $opt['logic']['cachemaps']['iframe'];
427
-$url = $opt['page']['protocol'] . strstr($opt['logic']['cachemaps']['url'], '://');
427
+$url = $opt['page']['protocol'].strstr($opt['logic']['cachemaps']['url'], '://');
428 428
 $url = str_replace('{userzoom}', $userzoom, $url);
429 429
 $url = str_replace('{latitude}', $rCache['latitude'], $url);
430 430
 $url = str_replace('{longitude}', $rCache['longitude'], $url);
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/modifier.smiley.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @subpackage plugins
7 7
  */
8 8
 
9
-require_once $opt['rootpath'] . 'lib2/smiley.inc.php';
9
+require_once $opt['rootpath'].'lib2/smiley.inc.php';
10 10
 
11 11
 function smarty_modifier_smiley($string)
12 12
 {
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/prefilter.t.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
     $end = 0;
58 58
     while (($start = smarty_prefilter_t_strpos_multi(
59 59
             $source,
60
-            [$smarty->left_delimiter . 't ', $smarty->left_delimiter . 't' . $smarty->right_delimiter],
60
+            [$smarty->left_delimiter.'t ', $smarty->left_delimiter.'t'.$smarty->right_delimiter],
61 61
             $end
62 62
         )) !== false) {
63
-        $end = mb_strpos($source, $smarty->left_delimiter . '/t' . $smarty->right_delimiter, $start);
63
+        $end = mb_strpos($source, $smarty->left_delimiter.'/t'.$smarty->right_delimiter, $start);
64 64
         $block_t = mb_substr($source, $start, $end - $start);
65 65
 
66 66
         $messgage_start = mb_strrpos($block_t, '}') + 1;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         );
73 73
 
74 74
         $output .= mb_substr($source, $output_start, $start - $output_start);
75
-        $output_start = $end + mb_strlen($smarty->left_delimiter . $smarty->right_delimiter) + 2;
75
+        $output_start = $end + mb_strlen($smarty->left_delimiter.$smarty->right_delimiter) + 2;
76 76
 
77 77
         $output .= $block_t;
78 78
     }
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
                     if ($block != '') {
117 117
                         $block .= ' ';
118 118
                     }
119
-                    $block .= $k . '=' . $v;
119
+                    $block .= $k.'='.$v;
120 120
                 }
121 121
 
122 122
                 // pass it to block.t
123
-                return $smarty->left_delimiter . 't ' . $block . $smarty->right_delimiter . $message . $smarty->left_delimiter . '/t' . $smarty->right_delimiter;
123
+                return $smarty->left_delimiter.'t '.$block.$smarty->right_delimiter.$message.$smarty->left_delimiter.'/t'.$smarty->right_delimiter;
124 124
             }
125 125
             unset($attrs['plural']);
126 126
             unset($attrs['count']);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
     /* Tokenize tag attributes. */
150 150
     preg_match_all(
151
-        '~(?:' . $smarty->_obj_call_regexp . '|' . $smarty->_qstr_regexp . ' | (?>[^"\'=\s]+)
151
+        '~(?:'.$smarty->_obj_call_regexp.'|'.$smarty->_qstr_regexp.' | (?>[^"\'=\s]+)
152 152
                       )+ |
153 153
                       [=]
154 154
                     ~x',
@@ -206,16 +206,16 @@  discard block
 block discarded – undo
206 206
                             if ($token == 'null') {
207 207
                                 $token = 'null';
208 208
                             } else {
209
-                                if (preg_match('~^' . $smarty->_num_const_regexp . '|0[xX][0-9a-fA-F]+$~', $token)) {
209
+                                if (preg_match('~^'.$smarty->_num_const_regexp.'|0[xX][0-9a-fA-F]+$~', $token)) {
210 210
                                     /* treat integer literally */
211 211
                                 } else {
212 212
                                     if (!preg_match(
213
-                                        '~^' . $smarty->_obj_call_regexp . '|' . $smarty->_var_regexp . '(?:' . $smarty->_mod_regexp . ')*$~',
213
+                                        '~^'.$smarty->_obj_call_regexp.'|'.$smarty->_var_regexp.'(?:'.$smarty->_mod_regexp.')*$~',
214 214
                                         $token
215 215
                                     )
216 216
                                     ) {
217 217
                                         /* treat as a string, double-quote it escaping quotes */
218
-                                        $token = '"' . addslashes($token) . '"';
218
+                                        $token = '"'.addslashes($token).'"';
219 219
                                     }
220 220
                                 }
221 221
                             }
@@ -299,12 +299,12 @@  discard block
 block discarded – undo
299 299
     $number = 1;
300 300
     foreach ($attrs as $attr) {
301 301
         if (is_numeric($attr)) {
302
-            $trans = mb_ereg_replace('%' . $number, $attr, $trans);
302
+            $trans = mb_ereg_replace('%'.$number, $attr, $trans);
303 303
         } else {
304
-            $trans = mb_ereg_replace('%' . $number, $smarty->left_delimiter . $attr . $smarty->right_delimiter, $trans);
304
+            $trans = mb_ereg_replace('%'.$number, $smarty->left_delimiter.$attr.$smarty->right_delimiter, $trans);
305 305
         }
306 306
 
307
-        $number ++;
307
+        $number++;
308 308
     }
309 309
 
310 310
     return $trans;
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/outputfilter.session.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
         if (SID != '' && session_id() != '') {
25 25
             $text = preg_replace(
26 26
                 '/<\\/form>/i',
27
-                '<input type="hidden" name="' . htmlspecialchars(session_name()) . '" value="' . htmlspecialchars(
27
+                '<input type="hidden" name="'.htmlspecialchars(session_name()).'" value="'.htmlspecialchars(
28 28
                     session_id()
29
-                ) . '" /></form>',
29
+                ).'" /></form>',
30 30
                 $text
31 31
             );
32 32
             $text = preg_replace_callback(
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     if (strpos($match[2], '?') === false) {
62
-        return 'href=' . $match[1] . $match[2] . '?' . urlencode(session_name()) . '=' . urlencode(
62
+        return 'href='.$match[1].$match[2].'?'.urlencode(session_name()).'='.urlencode(
63 63
             session_id()
64
-        ) . $match[3];
64
+        ).$match[3];
65 65
     } else {
66
-        return 'href=' . $match[1] . $match[2] . '&' . urlencode(session_name()) . '=' . urlencode(
66
+        return 'href='.$match[1].$match[2].'&'.urlencode(session_name()).'='.urlencode(
67 67
             session_id()
68
-        ) . $match[3];
68
+        ).$match[3];
69 69
     }
70 70
 }
Please login to merge, or discard this patch.