Completed
Push — master ( c2d7ad...3f78da )
by Thomas
07:29
created
htdocs/util/notification/run_notify.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -197,6 +197,9 @@
 block discarded – undo
197 197
     return 0;
198 198
 }
199 199
 
200
+/**
201
+ * @param string $domain
202
+ */
200 203
 function is_existent_maildomain($domain)
201 204
 {
202 205
     $smtp_serverlist = [];
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,15 +10,15 @@  discard block
 block discarded – undo
10 10
  ***************************************************************************/
11 11
 
12 12
 // needs absolute rootpath because called as cronjob
13
-$rootpath = __DIR__ . '/../../';
13
+$rootpath = __DIR__.'/../../';
14 14
 
15
-require_once $rootpath . 'lib/clicompatbase.inc.php';
16
-require_once $rootpath . 'lib2/translate.class.php';
17
-require_once __DIR__ . '/settings.inc.php';
18
-require_once $rootpath . 'lib/consts.inc.php';
19
-require_once $rootpath . 'lib2/ProcessSync.class.php';
20
-require_once $rootpath . 'lib/logic.inc.php';
21
-require_once $rootpath . 'lib2/logic/geomath.class.php';
15
+require_once $rootpath.'lib/clicompatbase.inc.php';
16
+require_once $rootpath.'lib2/translate.class.php';
17
+require_once __DIR__.'/settings.inc.php';
18
+require_once $rootpath.'lib/consts.inc.php';
19
+require_once $rootpath.'lib2/ProcessSync.class.php';
20
+require_once $rootpath.'lib/logic.inc.php';
21
+require_once $rootpath.'lib2/logic/geomath.class.php';
22 22
 
23 23
 if (!cronjobs_enabled()) {
24 24
     exit;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     switch ($notify['type']) {
87 87
         case notify_new_cache: // Type: new cache
88 88
             $mailbody = fetch_email_template('notify_newcache', $notify['recp_lang'], $notify['recp_domain']);
89
-            $mailsubject = '[' . $maildomain . '] ' .
89
+            $mailsubject = '['.$maildomain.'] '.
90 90
                 $translate->t(
91 91
                     $notify['oconly'] ? 'New OConly cache:' : 'New cache:',
92 92
                     '',
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
                     '',
96 96
                     1,
97 97
                     $notify['recp_lang']
98
-                ) .
99
-                ' ' . $notify['cachename'];
98
+                ).
99
+                ' '.$notify['cachename'];
100 100
             break;
101 101
 
102 102
         case notify_new_oconly: // Type: new OConly flag
103 103
             $mailbody = fetch_email_template('notify_newoconly', $notify['recp_lang'], $notify['recp_domain']);
104
-            $mailsubject = '[' . $maildomain . '] ' .
104
+            $mailsubject = '['.$maildomain.'] '.
105 105
                 $translate->t(
106 106
                     'Cache was marked as OConly:',
107 107
                     '',
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
                     '',
111 111
                     1,
112 112
                     $notify['recp_lang']
113
-                ) .
114
-                ' ' . $notify['cachename'];
113
+                ).
114
+                ' '.$notify['cachename'];
115 115
             break;
116 116
 
117 117
         default:
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         );
176 176
 
177 177
         /* begin send out everything that has to be sent */
178
-        $email_headers = 'From: "' . $mailfrom . '" <' . $mailfrom . '>';
178
+        $email_headers = 'From: "'.$mailfrom.'" <'.$mailfrom.'>';
179 179
 
180 180
         // send email
181 181
         if ($debug == true) {
@@ -188,11 +188,11 @@  discard block
 block discarded – undo
188 188
             mb_send_mail($mailadr, $mailsubject, $mailbody, $email_headers);
189 189
         }
190 190
     } else {
191
-        echo "Unknown notification type: " . $notify['type'] . "<br />";
191
+        echo "Unknown notification type: ".$notify['type']."<br />";
192 192
     }
193 193
 
194 194
     // logentry($module, $eventid, $userid, $objectid1, $objectid2, $logtext, $details)
195
-    logentry('notify_newcache', 8, $notify['recid'], $notify['cache_id'], 0, 'Sending mail to ' . $mailadr, []);
195
+    logentry('notify_newcache', 8, $notify['recid'], $notify['cache_id'], 0, 'Sending mail to '.$mailadr, []);
196 196
 
197 197
     return 0;
198 198
 }
Please login to merge, or discard this patch.
htdocs/util/watchlist/runwatch.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -484,6 +484,9 @@  discard block
 block discarded – undo
484 484
     );
485 485
 }
486 486
 
487
+/**
488
+ * @param string $watchtext
489
+ */
487 490
 function insert_maintenance_flags($rLog, $language, $watchtext)
488 491
 {
489 492
     global $translate;
@@ -510,6 +513,9 @@  discard block
 block discarded – undo
510 513
     return mb_ereg_replace('{maintenance_flags}', $flagtext, $watchtext);
511 514
 }
512 515
 
516
+/**
517
+ * @param string $domain
518
+ */
513 519
 function is_existent_maildomain($domain)
514 520
 {
515 521
     $smtp_serverlist = [];
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
  ***************************************************************************/
13 13
 
14 14
 // needs absolute rootpath because called as cronjob
15
-$rootpath = __DIR__ . '/../../';
16
-require_once $rootpath . 'lib/clicompatbase.inc.php';
17
-require_once $rootpath . 'lib2/translate.class.php';
18
-require_once __DIR__ . '/settings.inc.php';
19
-require_once $rootpath . 'lib/consts.inc.php';
20
-require_once $rootpath . 'lib/logic.inc.php';
21
-require_once $rootpath . 'lib2/edithelper.inc.php';
15
+$rootpath = __DIR__.'/../../';
16
+require_once $rootpath.'lib/clicompatbase.inc.php';
17
+require_once $rootpath.'lib2/translate.class.php';
18
+require_once __DIR__.'/settings.inc.php';
19
+require_once $rootpath.'lib/consts.inc.php';
20
+require_once $rootpath.'lib/logic.inc.php';
21
+require_once $rootpath.'lib2/edithelper.inc.php';
22 22
 
23 23
 if (!cronjobs_enabled()) {
24 24
     exit;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     WHERE cache_logs.cache_id=caches.cache_id
52 52
     AND cache_logs.owner_notified=0"
53 53
 );
54
-for ($i = 0; $i < mysql_num_rows($rsNewLogs); $i ++) {
54
+for ($i = 0; $i < mysql_num_rows($rsNewLogs); $i++) {
55 55
     $rNewLog = sql_fetch_array($rsNewLogs);
56 56
 
57 57
     $rsNotified = sql(
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     // See http://forum.opencaching.de/index.php?topic=3123.0 on AOL.
103 103
     if (sqlValue(
104 104
         "SELECT `email_problems` = 0 OR DATEDIFF(NOW(),`last_email_problem`) > 1+DATEDIFF(`last_email_problem`,`first_email_problem`)
105
-                        FROM `user` WHERE `user_id`='" . sql_escape($rcw['user_id']) . "'",
105
+                        FROM `user` WHERE `user_id`='" . sql_escape($rcw['user_id'])."'",
106 106
         1
107 107
     )) {
108 108
         process_log_watch($rcw['user_id'], $rcw['log_id']);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 /* begin send out everything that has to be sent */
117 117
 
118
-$email_headers = 'From: "' . $mailfrom . '" <' . $mailfrom . '>';
118
+$email_headers = 'From: "'.$mailfrom.'" <'.$mailfrom.'>';
119 119
 
120 120
 $rsUsers = sql(
121 121
     "SELECT
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     WHERE `user`.`watchmail_nextmail`<NOW()",
135 135
     $opt['template']['default']['locale']
136 136
 );
137
-for ($i = 0; $i < mysql_num_rows($rsUsers); $i ++) {
137
+for ($i = 0; $i < mysql_num_rows($rsUsers); $i++) {
138 138
     $rUser = sql_fetch_array($rsUsers);
139 139
 
140 140
     if ($rUser['watchmail_nextmail'] != '0000-00-00 00:00:00') {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 );
159 159
                 if (mysql_num_rows($rsWatchesOwner) > 0) {
160 160
                     $logtexts = '';
161
-                    for ($j = 0; $j < mysql_num_rows($rsWatchesOwner); $j ++) {
161
+                    for ($j = 0; $j < mysql_num_rows($rsWatchesOwner); $j++) {
162 162
                         $rWatch = sql_fetch_array($rsWatchesOwner);
163 163
                         $logtexts .= $rWatch['watchtext'];
164 164
                     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 );
184 184
                 if (mysql_num_rows($rsWatchesLog) > 0) {
185 185
                     $logtexts = '';
186
-                    for ($j = 0; $j < mysql_num_rows($rsWatchesLog); $j ++) {
186
+                    for ($j = 0; $j < mysql_num_rows($rsWatchesLog); $j++) {
187 187
                         $rWatch = sql_fetch_array($rsWatchesLog);
188 188
                         $logtexts .= $rWatch['watchtext'];
189 189
                     }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                     if (is_existent_maildomain(getToMailDomain($mailadr))) {
210 210
                         $language = $rUser['language'] ? $rUser['language'] : $opt['template']['default']['locale'];
211 211
                         $mailsubject =
212
-                            '[' . $maildomain . '] ' . $translate->t(
212
+                            '['.$maildomain.'] '.$translate->t(
213 213
                                 'Your watchlist of',
214 214
                                 '',
215 215
                                 basename(__FILE__),
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
                                 '',
218 218
                                 1,
219 219
                                 $language
220
-                            ) . ' ' . date($opt['locale'][$language]['format']['phpdate']);
220
+                            ).' '.date($opt['locale'][$language]['format']['phpdate']);
221 221
                         mb_send_mail($mailadr, $mailsubject, $mailbody, $email_headers);
222 222
 
223 223
                         // logentry($module, $eventid, $userid, $objectid1, $objectid2, $logtext, $details)
224
-                        logentry('watchlist', 2, $rUser['user_id'], 0, 0, 'Sending mail to ' . $mailadr, []);
224
+                        logentry('watchlist', 2, $rUser['user_id'], 0, 0, 'Sending mail to '.$mailadr, []);
225 225
                     }
226 226
                 }
227 227
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 
321 321
     $logtext = html2plaintext($rLog['text'], $rLog['text_html'] == 0, EMAIL_LINEWRAP);
322 322
 
323
-    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
323
+    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
324 324
     if (!$language) {
325 325
         $language = $opt['template']['default']['locale'];
326 326
     }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     }
332 332
 
333 333
     $watchtext =
334
-        '{date} ' . $translate->t(
334
+        '{date} '.$translate->t(
335 335
             '{user} has logged your cache "{cachename}":',
336 336
             '',
337 337
             basename(__FILE__),
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             '',
340 340
             1,
341 341
             $language
342
-        ) . ' {action}{maintenance_flags}' . "\n" . '{shortlink_url}{wp_oc}' . "\n\n" . '{text}' . "\n\n\n\n";
342
+        ).' {action}{maintenance_flags}'."\n".'{shortlink_url}{wp_oc}'."\n\n".'{text}'."\n\n\n\n";
343 343
 
344 344
     $watchtext = mb_ereg_replace('{date}', date($dateformat, strtotime($rLog['logdate'])), $watchtext);
345 345
     $watchtext = mb_ereg_replace('{wp_oc}', $rLog['wp_oc'], $watchtext);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     $watchtext = mb_ereg_replace('{action}', get_logtype_name($rLog['type'], $language), $watchtext);
350 350
     $watchtext = insert_maintenance_flags($rLog, $language, $watchtext);
351 351
 
352
-    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
352
+    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
353 353
     $urls = get_site_urls($domain);
354 354
     if ($urls['shortlink_url']) {
355 355
         $watchtext = mb_ereg_replace("{shortlink_url}", $urls['shortlink_url'], $watchtext);
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
     $logtext = html2plaintext($rLog['text'], $rLog['text_html'] == 0, EMAIL_LINEWRAP);
405 405
 
406
-    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
406
+    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
407 407
     if (!$language) {
408 408
         $language = $opt['template']['default']['locale'];
409 409
     }
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
     }
415 415
 
416 416
     $watchtext =
417
-        '{date} ' . $translate->t(
417
+        '{date} '.$translate->t(
418 418
             '{user} has logged the cache "{cachename}":',
419 419
             '',
420 420
             basename(__FILE__),
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
             '',
423 423
             1,
424 424
             $language
425
-        ) . ' {action}{maintenance_flags}' . "\n" . '{shortlink_url}{wp_oc}' . "\n{cachelists}\n" . '{text}' . "\n\n\n\n";
425
+        ).' {action}{maintenance_flags}'."\n".'{shortlink_url}{wp_oc}'."\n{cachelists}\n".'{text}'."\n\n\n\n";
426 426
 
427 427
     $watchtext = mb_ereg_replace('{date}', date($dateformat, strtotime($rLog['logdate'])), $watchtext);
428 428
     $watchtext = mb_ereg_replace('{wp_oc}', $rLog['wp_oc'], $watchtext);
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
                     '',
456 456
                     1,
457 457
                     $language
458
-                ) . ' ' . $cachelist_names[0] . "\n";
458
+                ).' '.$cachelist_names[0]."\n";
459 459
             break;
460 460
         default:
461 461
             $cachelists =
@@ -467,11 +467,11 @@  discard block
 block discarded – undo
467 467
                     '',
468 468
                     1,
469 469
                     $language
470
-                ) . ' ' . implode(', ', $cachelist_names) . "\n";
470
+                ).' '.implode(', ', $cachelist_names)."\n";
471 471
     }
472 472
     $watchtext = mb_ereg_replace('{cachelists}', $cachelists, $watchtext);
473 473
 
474
-    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
474
+    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
475 475
     $urls = get_site_urls($domain);
476 476
     if ($urls['shortlink_url']) {
477 477
         $watchtext = mb_ereg_replace("{shortlink_url}", $urls['shortlink_url'], $watchtext);
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
     }
563 563
 
564 564
     if (file_exists($PidFile)) {
565
-        echo "Error: Pidfile (" . $PidFile . ") already present at " . __FILE__ . ":" . __LINE__ . "!\n";
565
+        echo "Error: Pidfile (".$PidFile.") already present at ".__FILE__.":".__LINE__."!\n";
566 566
 
567 567
         return false;
568 568
     } else {
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 
573 573
             return true;
574 574
         } else {
575
-            echo "can't create Pidfile $PidFile at " . __FILE__ . ":" . __LINE__ . "!\n";
575
+            echo "can't create Pidfile $PidFile at ".__FILE__.":".__LINE__."!\n";
576 576
 
577 577
             return false;
578 578
         }
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
         $pid_daemon = fgets($pidfile, 20);
589 589
         fclose($pidfile);
590 590
 
591
-        $pid_daemon = (int) $pid_daemon;
591
+        $pid_daemon = (int)$pid_daemon;
592 592
 
593 593
         // process running?
594 594
         if (posix_kill($pid_daemon, 0)) {
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
             false;
598 598
         } else {
599 599
             // no, remove pid_file
600
-            echo "process not running, removing old pid_file (" . $PidFile . ")\n";
600
+            echo "process not running, removing old pid_file (".$PidFile.")\n";
601 601
             unlink($PidFile);
602 602
 
603 603
             return true;
@@ -619,10 +619,10 @@  discard block
 block discarded – undo
619 619
             unlink($PidFile);
620 620
         }
621 621
     } else {
622
-        echo "Error: can't delete own pidfile (" . $PidFile . ") at " . __FILE__ . ":" . __LINE__ . "!\n";
622
+        echo "Error: can't delete own pidfile (".$PidFile.") at ".__FILE__.":".__LINE__."!\n";
623 623
     }
624 624
 
625 625
     if ($message) {
626
-        echo $message . "\n";
626
+        echo $message."\n";
627 627
     }
628 628
 }
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/geokrety.class.php 2 patches
Doc Comments   +32 added lines patch added patch discarded remove patch
@@ -61,6 +61,10 @@  discard block
 block discarded – undo
61 61
 
62 62
     /* remove given file
63 63
      */
64
+
65
+    /**
66
+     * @param string $file
67
+     */
64 68
     public function removeXML($file)
65 69
     {
66 70
         @unlink($file);
@@ -68,6 +72,10 @@  discard block
 block discarded – undo
68 72
 
69 73
     /* import the given XML file
70 74
      */
75
+
76
+    /**
77
+     * @param string $file
78
+     */
71 79
     public function importXML($file)
72 80
     {
73 81
         global $opt;
@@ -124,6 +132,9 @@  discard block
 block discarded – undo
124 132
         setSysConfig('geokrety_lastupdate', date($opt['db']['dateformat'], strtotime($startupdate)));
125 133
     }
126 134
 
135
+    /**
136
+     * @param DOMNode $element
137
+     */
127 138
     public function importGeoKret($element)
128 139
     {
129 140
         global $opt;
@@ -204,6 +215,9 @@  discard block
 block discarded – undo
204 215
     }
205 216
 
206 217
 
218
+    /**
219
+     * @param DOMNode $element
220
+     */
207 221
     public function importMove($element)
208 222
     {
209 223
         global $opt;
@@ -292,6 +306,9 @@  discard block
 block discarded – undo
292 306
     }
293 307
 
294 308
 
309
+    /**
310
+     * @param integer $id
311
+     */
295 312
     public function checkGeoKretType($id, $name)
296 313
     {
297 314
         sql(
@@ -302,6 +319,9 @@  discard block
 block discarded – undo
302 319
     }
303 320
 
304 321
 
322
+    /**
323
+     * @param integer $id
324
+     */
305 325
     public function checkUser($id, $name)
306 326
     {
307 327
         if ($id == 0) {
@@ -312,6 +332,9 @@  discard block
 block discarded – undo
312 332
     }
313 333
 
314 334
 
335
+    /**
336
+     * @param integer $id
337
+     */
315 338
     public function checkMoveType($id, $name)
316 339
     {
317 340
         sql(
@@ -322,6 +345,9 @@  discard block
 block discarded – undo
322 345
     }
323 346
 
324 347
 
348
+    /**
349
+     * @param string $element
350
+     */
325 351
     public function GetNodeValue(&$domnode, $element)
326 352
     {
327 353
         $subnode = $domnode->getElementsByTagName($element);
@@ -333,6 +359,12 @@  discard block
 block discarded – undo
333 359
     }
334 360
 
335 361
 
362
+    /**
363
+     * @param string $element
364
+     * @param string $attr
365
+     *
366
+     * @return string
367
+     */
336 368
     public function GetNodeAttribute(&$domnode, $element, $attr)
337 369
     {
338 370
         $subnode = $domnode->getElementsByTagName($element);
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
     {
43 43
         global $opt;
44 44
 
45
-        if (!@mkdir(__DIR__ . '/../../../cache2/geokrety')) {
45
+        if (!@mkdir(__DIR__.'/../../../cache2/geokrety')) {
46 46
             // die('can\'t create geogrety cache dir');
47 47
         }
48
-        $path = __DIR__ . '/../../../cache2/geokrety/import-' . date('Ymd-His') . '.xml';
48
+        $path = __DIR__.'/../../../cache2/geokrety/import-'.date('Ymd-His').'.xml';
49 49
 
50 50
         // Changed default-value for getSysConfig() from '2005-01-01 00:00:00' to 'NOW - 9d 12h'
51 51
         // to safely stay in api-limit, even when client and server are in different time zones.
52 52
         $modifiedsince = strtotime(
53 53
             getSysConfig('geokrety_lastupdate', date($opt['db']['dateformat'], time() - 60 * 60 * 24 * 9.5))
54 54
         );
55
-        if (!@copy('http://geokrety.org/export.php?modifiedsince=' . date('YmdHis', $modifiedsince - 1), $path)) {
55
+        if (!@copy('http://geokrety.org/export.php?modifiedsince='.date('YmdHis', $modifiedsince - 1), $path)) {
56 56
             return false;
57 57
         }
58 58
 
@@ -81,19 +81,19 @@  discard block
 block discarded – undo
81 81
 
82 82
         $xr->read();
83 83
         if ($xr->nodeType != XMLReader::ELEMENT) {
84
-            echo 'error: First element expected, aborted' . "\n";
84
+            echo 'error: First element expected, aborted'."\n";
85 85
 
86 86
             return;
87 87
         }
88 88
         if ($xr->name != 'gkxml') {
89
-            echo 'error: First element not valid, aborted' . "\n";
89
+            echo 'error: First element not valid, aborted'."\n";
90 90
 
91 91
             return;
92 92
         }
93 93
 
94 94
         $startupdate = $xr->getAttribute('date');
95 95
         if ($startupdate == '') {
96
-            echo 'error: Date attribute not valid, aborted' . "\n";
96
+            echo 'error: Date attribute not valid, aborted'."\n";
97 97
 
98 98
             return;
99 99
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                         break;
116 116
                 }
117 117
 
118
-                $nRecordsCount ++;
118
+                $nRecordsCount++;
119 119
             }
120 120
         } while ($xr->next());
121 121
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         $waypoints = $element->getElementsByTagName('waypoints');
254 254
         if ($waypoints->length > 0) {
255 255
             $wpItems = $waypoints->item(0)->getElementsByTagName('waypoint');
256
-            for ($i = 0; $i < $wpItems->length; $i ++) {
256
+            for ($i = 0; $i < $wpItems->length; $i++) {
257 257
                 $wp = mb_trim($wpItems->item($i)->nodeValue);
258 258
                 if ($wp != '') {
259 259
                     sql("INSERT INTO `gk_move_waypoint` (`id`, `wp`) VALUES ('&1', '&2')", $id, $wp);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 WHERE `id`='&2' AND `wp`!=''",
286 286
                 $gkid,
287 287
                 $r['id']
288
-            );  // "late log" bugfix: replaced $id paramter by $r['id']
288
+            ); // "late log" bugfix: replaced $id paramter by $r['id']
289 289
         } else {
290 290
             // do nothing
291 291
         }
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/sitemaps.class.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
         $this->ping_searchengine('http://www.bing.com/webmaster/ping.aspx?siteMap=' . $url);
62 62
     }
63 63
 
64
+    /**
65
+     * @param string $url
66
+     */
64 67
     public function ping_searchengine($url)
65 68
     {
66 69
         $curl = curl_init($url);
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
         global $opt;
51 51
 
52 52
         $url = urlencode(
53
-            ($opt['page']['https']['mode'] == HTTPS_ENFORCED ? $opt['page']['absolute_https_url'] : $opt['page']['absolute_http_url']) . 'sitemap.xml'
53
+            ($opt['page']['https']['mode'] == HTTPS_ENFORCED ? $opt['page']['absolute_https_url'] : $opt['page']['absolute_http_url']).'sitemap.xml'
54 54
         );
55 55
 
56
-        $this->ping_searchengine('http://www.google.com/webmasters/tools/ping?sitemap=' . $url);
56
+        $this->ping_searchengine('http://www.google.com/webmasters/tools/ping?sitemap='.$url);
57 57
         $this->ping_searchengine(
58
-            'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=USERID&url=' . $url
58
+            'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=USERID&url='.$url
59 59
         );
60
-        $this->ping_searchengine('http://submissions.ask.com/ping?sitemap=' . $url);
61
-        $this->ping_searchengine('http://www.bing.com/webmaster/ping.aspx?siteMap=' . $url);
60
+        $this->ping_searchengine('http://submissions.ask.com/ping?sitemap='.$url);
61
+        $this->ping_searchengine('http://www.bing.com/webmaster/ping.aspx?siteMap='.$url);
62 62
     }
63 63
 
64 64
     public function ping_searchengine($url)
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $nCount = sql_value("SELECT COUNT(*) FROM `caches` WHERE `caches`.`status`=1", 0);
91 91
         $nIndex = 0;
92 92
         while ($nIndex < $nCount) {
93
-            $this->oSitemapXML->write('newcaches.php?startat=' . $nIndex, time(), 'always');
93
+            $this->oSitemapXML->write('newcaches.php?startat='.$nIndex, time(), 'always');
94 94
             $nIndex += 100;
95 95
         }
96 96
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $rs = sql("SELECT SQL_BUFFER_RESULT `user_id` FROM `user`");
101 101
         while ($r = sql_fetch_assoc($rs)) {
102
-            $this->oSitemapXML->write('viewprofile.php?userid=' . $r['user_id'], time() - 31 * 24 * 60 * 60);
102
+            $this->oSitemapXML->write('viewprofile.php?userid='.$r['user_id'], time() - 31 * 24 * 60 * 60);
103 103
         }
104 104
         sql_free_result($rs);
105 105
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             "SELECT SQL_BUFFER_RESULT MAX(`last_modified`) AS `d`, `cache_id` FROM `cache_logs` GROUP BY `cache_id`"
111 111
         );
112 112
         while ($r = sql_fetch_assoc($rs)) {
113
-            $this->oSitemapXML->write('viewlogs.php?cacheid=' . $r['cache_id'], strtotime($r['d']));
113
+            $this->oSitemapXML->write('viewlogs.php?cacheid='.$r['cache_id'], strtotime($r['d']));
114 114
         }
115 115
         sql_free_result($rs);
116 116
     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 $r['cache_id']
143 143
             );
144 144
             $this->oSitemapXML->write(
145
-                'viewcache.php?wp=' . $r['wp_oc'] . '&desclang=' . $r['language'],
145
+                'viewcache.php?wp='.$r['wp_oc'].'&desclang='.$r['language'],
146 146
                 strtotime($dLastMod)
147 147
             );
148 148
         }
Please login to merge, or discard this patch.
htdocs/xml/ocxml11.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -368,6 +368,9 @@
 block discarded – undo
368 368
 /* end parameter reading */
369 369
 
370 370
 
371
+/**
372
+ * @param integer $sessionid
373
+ */
371 374
 function outputXmlFile($sessionid, $filenr, $bXmlDecl, $bOcXmlTag, $bDocType, $ziptype)
372 375
 {
373 376
     global $zip_basedir, $zip_wwwdir, $sDateformat, $sDateshort, $t1, $t2, $t3, $safemode_zip, $safemode_zip, $sCharset, $bAttrlist;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@
 block discarded – undo
27 27
     $for_cachedesc,
28 28
     $html,
29 29
     $twolines = false
30
-) {
30
+)
31
+{
31 32
     global $opt, $translate;
32 33
 
33 34
     $ltext = "";
Please login to merge, or discard this patch.
Spacing   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 }
17 17
 
18 18
 $opt['rootpath'] = '../';
19
-require_once __DIR__ . '/../lib/common.inc.php';
20
-require_once __DIR__ . '/../lib2/charset.inc.php';
21
-require_once __DIR__ . '/../lib2/const.inc.php';
22
-require_once __DIR__ . '/../lib2/logic/data-license.inc.php';
23
-require_once __DIR__ . '/../lib2/logic/npas.inc.php';
24
-require_once __DIR__ .' /../lib2/logic/geomath.class.php';
19
+require_once __DIR__.'/../lib/common.inc.php';
20
+require_once __DIR__.'/../lib2/charset.inc.php';
21
+require_once __DIR__.'/../lib2/const.inc.php';
22
+require_once __DIR__.'/../lib2/logic/data-license.inc.php';
23
+require_once __DIR__.'/../lib2/logic/npas.inc.php';
24
+require_once __DIR__.' /../lib2/logic/geomath.class.php';
25 25
 
26 26
 if ($error == true) {
27 27
     echo 'Unable to connect to database';
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     sql('DELETE FROM `xmlsession_data` WHERE `session_id`=&1', $r['id']);
106 106
 
107 107
     // delete files
108
-    $path = $zip_basedir . 'ocxml11/' . $r['id'];
108
+    $path = $zip_basedir.'ocxml11/'.$r['id'];
109 109
     if (is_dir($path)) {
110 110
         unlinkrecursiv($path);
111 111
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     if (isset($_REQUEST['country'])) {
192 192
         $country = $_REQUEST['country'];
193 193
 
194
-        if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\'' . sql_escape($country) . '\'', 0) != 1) {
194
+        if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\''.sql_escape($country).'\'', 0) != 1) {
195 195
             die('Unknown country');
196 196
         }
197 197
 
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
                 $selection['type'] = 3;
237 237
                 if (isset($_REQUEST['wp'])) {
238 238
                     $selection['cacheid'] = sqlValue(
239
-                        "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='" . sql_escape($_REQUEST['wp']) . "'",
239
+                        "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='".sql_escape($_REQUEST['wp'])."'",
240 240
                         0
241 241
                     );
242 242
                 } else {
243 243
                     if (isset($_REQUEST['uuid'])) {
244 244
                         $selection['cacheid'] = sqlValue(
245
-                            "SELECT `cache_id` FROM `caches` WHERE `uuid`='" . sql_escape($_REQUEST['uuid']) . "'",
245
+                            "SELECT `cache_id` FROM `caches` WHERE `uuid`='".sql_escape($_REQUEST['uuid'])."'",
246 246
                             0
247 247
                         );
248 248
                     } else {
@@ -301,23 +301,23 @@  discard block
 block discarded – undo
301 301
         $xmloutput = '';
302 302
         if ($bXmlDecl == '1') {
303 303
             if ($sCharset == 'iso-8859-1') {
304
-                $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>' . "\n";
304
+                $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>'."\n";
305 305
             } else {
306 306
                 if ($sCharset == 'utf-8') {
307
-                    $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . "\n";
307
+                    $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'."\n";
308 308
                 }
309 309
             }
310 310
         }
311 311
         if ($bOcXmlTag == '1') {
312
-            $xmloutput .= '<ocxmlsession>' . "\n";
312
+            $xmloutput .= '<ocxmlsession>'."\n";
313 313
         }
314
-        $xmloutput .= '  <sessionid>' . $sessionid . '</sessionid>' . "\n";
315
-        $xmloutput .= '  <records user="' . $recordcount['users'] .
316
-            '" cache="' . $recordcount['caches'] .
317
-            '" cachedesc="' . $recordcount['cachedescs'] .
318
-            '" cachelog="' . $recordcount['cachelogs'] .
319
-            '" picture="' . $recordcount['pictures'] .
320
-            '" removeobject="' . $recordcount['removedobjects'] . '" />' . "\n";
314
+        $xmloutput .= '  <sessionid>'.$sessionid.'</sessionid>'."\n";
315
+        $xmloutput .= '  <records user="'.$recordcount['users'].
316
+            '" cache="'.$recordcount['caches'].
317
+            '" cachedesc="'.$recordcount['cachedescs'].
318
+            '" cachelog="'.$recordcount['cachelogs'].
319
+            '" picture="'.$recordcount['pictures'].
320
+            '" removeobject="'.$recordcount['removedobjects'].'" />'."\n";
321 321
         if ($bOcXmlTag == '1') {
322 322
             $xmloutput .= '</ocxmlsession>';
323 323
         }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
     $logtypes = [];
388 388
     $rs = sql('SELECT `id`, `de` FROM log_types');
389
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
389
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
390 390
         $r = sql_fetch_array($rs);
391 391
         $logtypes[$r['id']] = $r['de'];
392 392
     }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 
395 395
     $cachetypes = [];
396 396
     $rs = sql('SELECT `id`, `short`, `de` FROM cache_type');
397
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
397
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
398 398
         $r = sql_fetch_array($rs);
399 399
         $cachetypes[$r['id']]['de'] = $r['de'];
400 400
         $cachetypes[$r['id']]['short'] = $r['short'];
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
     $cachestatus = [];
405 405
     $rs = sql('SELECT `id`, `de` FROM cache_status');
406
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
406
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
407 407
         $r = sql_fetch_array($rs);
408 408
         $cachestatus[$r['id']]['de'] = $r['de'];
409 409
     }
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 
412 412
     $counties = [];
413 413
     $rs = sql('SELECT `short`, `de` FROM countries');
414
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
414
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
415 415
         $r = sql_fetch_array($rs);
416 416
         $counties[$r['short']]['de'] = $r['de'];
417 417
     }
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 
420 420
     $cachesizes = [];
421 421
     $rs = sql('SELECT `id`, `de` FROM cache_size');
422
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
422
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
423 423
         $r = sql_fetch_array($rs);
424 424
         $cachesizes[$r['id']]['de'] = $r['de'];
425 425
     }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 
428 428
     $languages = [];
429 429
     $rs = sql('SELECT `short`, `de` FROM languages');
430
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
430
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
431 431
         $r = sql_fetch_array($rs);
432 432
         $languages[$r['short']]['de'] = $r['de'];
433 433
     }
@@ -438,32 +438,32 @@  discard block
 block discarded – undo
438 438
     $objecttypes['3'] = 'cachedesc';
439 439
     $objecttypes['1'] = 'cachelog';
440 440
     $objecttypes['6'] = 'picture';
441
-    $objecttypes['8'] = 'cachelist';    // not implemented yet
441
+    $objecttypes['8'] = 'cachelist'; // not implemented yet
442 442
 
443 443
     /* end now a few dynamically loaded constants */
444 444
 
445 445
     // temporäre Datei erstellen
446
-    if (!is_dir($zip_basedir . 'ocxml11/' . $sessionid)) {
447
-        mkdir($zip_basedir . 'ocxml11/' . $sessionid);
446
+    if (!is_dir($zip_basedir.'ocxml11/'.$sessionid)) {
447
+        mkdir($zip_basedir.'ocxml11/'.$sessionid);
448 448
     }
449 449
 
450 450
     $fileid = 1;
451 451
     while (file_exists(
452
-        $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'
452
+        $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml'
453 453
     )) {
454
-        $fileid ++;
454
+        $fileid++;
455 455
     }
456 456
 
457
-    $xmlfilename = $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml';
457
+    $xmlfilename = $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml';
458 458
 
459 459
     $f = fopen($xmlfilename, 'w');
460 460
 
461 461
     if ($bXmlDecl == '1') {
462 462
         if ($sCharset == 'iso-8859-1') {
463
-            fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>' . "\n");
463
+            fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>'."\n");
464 464
         } else {
465 465
             if ($sCharset == 'utf-8') {
466
-                fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>' . "\n");
466
+                fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>'."\n");
467 467
             }
468 468
         }
469 469
     }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     if ($bDocType == '1') {
472 472
         fwrite(
473 473
             $f,
474
-            '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.' . ($ocxmlversion % 10) . '//EN" "http://www.opencaching.de/xml/ocxml' . $ocxmlversion . '.dtd">' . "\n"
474
+            '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.'.($ocxmlversion % 10).'//EN" "http://www.opencaching.de/xml/ocxml'.$ocxmlversion.'.dtd">'."\n"
475 475
         );
476 476
     }
477 477
     if ($bOcXmlTag == '1') {
@@ -479,30 +479,30 @@  discard block
 block discarded – undo
479 479
         $r = sql_fetch_array($rs);
480 480
         fwrite(
481 481
             $f,
482
-            '<oc11xml version="1.' . ($ocxmlversion % 10) . '" date="' . date(
482
+            '<oc11xml version="1.'.($ocxmlversion % 10).'" date="'.date(
483 483
                 $sDateformat,
484 484
                 strtotime($r['date_created'])
485
-            ) . '" since="' . date($sDateformat, strtotime($r['modified_since'])) . '">' . "\n"
485
+            ).'" since="'.date($sDateformat, strtotime($r['modified_since'])).'">'."\n"
486 486
         );
487 487
         mysql_free_result($rs);
488 488
     }
489 489
 
490 490
     if ($bAttrlist == '1') {
491 491
         $rs = sql("SELECT SQL_BUFFER_RESULT `id`, `name`, `icon_large`, `icon_no`, `icon_undef` FROM `cache_attrib`");
492
-        fwrite($f, $t1 . '<attrlist>' . "\n");
492
+        fwrite($f, $t1.'<attrlist>'."\n");
493 493
         while ($r = sql_fetch_assoc($rs)) {
494 494
             fwrite(
495 495
                 $f,
496
-                $t2 . '<attr id="' . $r['id'] . '" icon_large="' . xmlentities(
497
-                    $opt['page']['default_absolute_url'] . $r['icon_large']
498
-                ) . '" icon_no="' . xmlentities(
499
-                    $opt['page']['default_absolute_url'] . $r['icon_no']
500
-                ) . '" icon_undef="' . xmlentities(
501
-                    $opt['page']['default_absolute_url'] . $r['icon_undef']
502
-                ) . '">' . xmlcdata($r['name']) . '</attr>' . "\n"
496
+                $t2.'<attr id="'.$r['id'].'" icon_large="'.xmlentities(
497
+                    $opt['page']['default_absolute_url'].$r['icon_large']
498
+                ).'" icon_no="'.xmlentities(
499
+                    $opt['page']['default_absolute_url'].$r['icon_no']
500
+                ).'" icon_undef="'.xmlentities(
501
+                    $opt['page']['default_absolute_url'].$r['icon_undef']
502
+                ).'">'.xmlcdata($r['name']).'</attr>'."\n"
503 503
             );
504 504
         }
505
-        fwrite($f, $t1 . '</attrlist>' . "\n");
505
+        fwrite($f, $t1.'</attrlist>'."\n");
506 506
         sql_free_result($rs);
507 507
     }
508 508
 
@@ -510,18 +510,18 @@  discard block
 block discarded – undo
510 510
         'SELECT SQL_BUFFER_RESULT `user`.`user_id` `id`, `user`.`node` `node`, `user`.`uuid` `uuid`, `user`.`username` `username`, `user`.`pmr_flag` `pmr_flag`, `user`.`date_created` `date_created`, `user`.`last_modified` `last_modified` FROM `tmpxml_users`, `user` WHERE `tmpxml_users`.`id`=`user`.`user_id`'
511 511
     );
512 512
     while ($r = sql_fetch_array($rs)) {
513
-        fwrite($f, $t1 . '<user>' . "\n");
513
+        fwrite($f, $t1.'<user>'."\n");
514 514
 
515
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
516
-        fwrite($f, $t2 . '<username>' . xmlcdata($r['username']) . '</username>' . "\n");
517
-        fwrite($f, $t2 . '<pmr>' . (($r['pmr_flag'] == 0) ? '0' : '1') . '</pmr>' . "\n");
518
-        fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
515
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
516
+        fwrite($f, $t2.'<username>'.xmlcdata($r['username']).'</username>'."\n");
517
+        fwrite($f, $t2.'<pmr>'.(($r['pmr_flag'] == 0) ? '0' : '1').'</pmr>'."\n");
518
+        fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n");
519 519
         fwrite(
520 520
             $f,
521
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
521
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
522 522
         );
523 523
 
524
-        fwrite($f, $t1 . '</user>' . "\n");
524
+        fwrite($f, $t1.'</user>'."\n");
525 525
     }
526 526
     mysql_free_result($rs);
527 527
 
@@ -550,8 +550,8 @@  discard block
 block discarded – undo
550 550
         }   // return as micro in old interface version
551 551
 
552 552
         if ($ocxmlversion >= 15) {
553
-            $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"';
554
-            $gccom2 = ' gccom2="' . xmlentities($r['wp_gc_maintained']) . '"';
553
+            $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"';
554
+            $gccom2 = ' gccom2="'.xmlentities($r['wp_gc_maintained']).'"';
555 555
             $nccom = '';
556 556
         } else {
557 557
             $statusflags = '';
@@ -559,74 +559,74 @@  discard block
 block discarded – undo
559 559
             $nccom = ' nccom=""';
560 560
         }
561 561
 
562
-        fwrite($f, $t1 . '<cache>' . "\n");
562
+        fwrite($f, $t1.'<cache>'."\n");
563 563
 
564
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
564
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
565 565
         fwrite(
566 566
             $f,
567
-            $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata(
567
+            $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata(
568 568
                 $r['username']
569
-            ) . '</userid>' . "\n"
569
+            ).'</userid>'."\n"
570 570
         );
571
-        fwrite($f, $t2 . '<name>' . xmlcdata(($bAllowView ? $r['name'] : '')) . '</name>' . "\n");
571
+        fwrite($f, $t2.'<name>'.xmlcdata(($bAllowView ? $r['name'] : '')).'</name>'."\n");
572 572
         fwrite(
573 573
             $f,
574
-            $t2 . '<longitude>' . sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)) . '</longitude>' . "\n"
574
+            $t2.'<longitude>'.sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)).'</longitude>'."\n"
575 575
         );
576
-        fwrite($f, $t2 . '<latitude>' . sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)) . '</latitude>' . "\n");
576
+        fwrite($f, $t2.'<latitude>'.sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)).'</latitude>'."\n");
577 577
         fwrite(
578 578
             $f,
579
-            $t2 . '<type id="' . $r['type'] . '" short="' . xmlentities(
579
+            $t2.'<type id="'.$r['type'].'" short="'.xmlentities(
580 580
                 $cachetypes[$r['type']]['short']
581
-            ) . '">' . xmlcdata($cachetypes[$r['type']]['de']) . '</type>' . "\n"
581
+            ).'">'.xmlcdata($cachetypes[$r['type']]['de']).'</type>'."\n"
582 582
         );
583 583
         fwrite(
584 584
             $f,
585
-            $t2 . '<status id="' . $r['status'] . '"' . $statusflags . '>' . xmlcdata(
585
+            $t2.'<status id="'.$r['status'].'"'.$statusflags.'>'.xmlcdata(
586 586
                 $cachestatus[$r['status']]['de']
587
-            ) . '</status>' . "\n"
587
+            ).'</status>'."\n"
588 588
         );
589 589
         fwrite(
590 590
             $f,
591
-            $t2 . '<country id="' . $r['country'] . '">' . xmlcdata(
591
+            $t2.'<country id="'.$r['country'].'">'.xmlcdata(
592 592
                 $counties[$r['country']]['de']
593
-            ) . '</country>' . "\n"
593
+            ).'</country>'."\n"
594 594
         );
595
-        fwrite($f, $t2 . '<size id="' . $r['size'] . '">' . xmlcdata($cachesizes[$r['size']]['de']) . '</size>' . "\n");
596
-        fwrite($f, $t2 . '<desclanguages>' . $r['desclanguages'] . '</desclanguages>' . "\n");
597
-        fwrite($f, $t2 . '<difficulty>' . sprintf('%01.1f', $r['difficulty'] / 2) . '</difficulty>' . "\n");
598
-        fwrite($f, $t2 . '<terrain>' . sprintf('%01.1f', $r['terrain'] / 2) . '</terrain>' . "\n");
599
-        fwrite($f, $t2 . '<rating waylength="' . $r['way_length'] . '" needtime="' . $r['search_time'] . '" />' . "\n");
595
+        fwrite($f, $t2.'<size id="'.$r['size'].'">'.xmlcdata($cachesizes[$r['size']]['de']).'</size>'."\n");
596
+        fwrite($f, $t2.'<desclanguages>'.$r['desclanguages'].'</desclanguages>'."\n");
597
+        fwrite($f, $t2.'<difficulty>'.sprintf('%01.1f', $r['difficulty'] / 2).'</difficulty>'."\n");
598
+        fwrite($f, $t2.'<terrain>'.sprintf('%01.1f', $r['terrain'] / 2).'</terrain>'."\n");
599
+        fwrite($f, $t2.'<rating waylength="'.$r['way_length'].'" needtime="'.$r['search_time'].'" />'."\n");
600 600
         fwrite(
601 601
             $f,
602
-            $t2 . '<waypoints oc="' . xmlentities($r['wp_oc']) . '" gccom="' . xmlentities(
602
+            $t2.'<waypoints oc="'.xmlentities($r['wp_oc']).'" gccom="'.xmlentities(
603 603
                 $r['wp_gc']
604
-            ) . '"' . $gccom2 . $nccom . ' />' . "\n"
604
+            ).'"'.$gccom2.$nccom.' />'."\n"
605 605
         );
606
-        fwrite($f, $t2 . '<datehidden>' . date($sDateformat, strtotime($r['date_hidden'])) . '</datehidden>' . "\n");
606
+        fwrite($f, $t2.'<datehidden>'.date($sDateformat, strtotime($r['date_hidden'])).'</datehidden>'."\n");
607 607
         if ($ocxmlversion >= 12) {
608
-            $pd = ' ispublishdate="' . $r['is_publishdate'] . '"';
608
+            $pd = ' ispublishdate="'.$r['is_publishdate'].'"';
609 609
         } else {
610 610
             $pd = "";
611 611
         }
612 612
         fwrite(
613 613
             $f,
614
-            $t2 . '<datecreated' . $pd . '>' . date(
614
+            $t2.'<datecreated'.$pd.'>'.date(
615 615
                 $sDateformat,
616 616
                 strtotime($r['date_created'])
617
-            ) . '</datecreated>' . "\n"
617
+            ).'</datecreated>'."\n"
618 618
         );
619 619
         fwrite(
620 620
             $f,
621
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
621
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
622 622
         );
623 623
         if ($ocxmlversion >= 14) {
624 624
             fwrite(
625 625
                 $f,
626
-                $t2 . '<listing_lastmodified>' . date(
626
+                $t2.'<listing_lastmodified>'.date(
627 627
                     $sDateformat,
628 628
                     strtotime($r['listing_last_modified'])
629
-                ) . '</listing_lastmodified>' . "\n"
629
+                ).'</listing_lastmodified>'."\n"
630 630
             );
631 631
         }
632 632
 
@@ -637,16 +637,16 @@  discard block
 block discarded – undo
637 637
                               WHERE `caches_attributes`.`cache_id`='&1'",
638 638
             $r['id']
639 639
         );
640
-        fwrite($f, $t2 . '<attributes>' . "\n");
640
+        fwrite($f, $t2.'<attributes>'."\n");
641 641
         while ($rAttribute = sql_fetch_assoc($rsAttributes)) {
642 642
             fwrite(
643 643
                 $f,
644
-                $t3 . '<attribute id="' . ($rAttribute['id'] + 0) . '">' . xmlcdata(
644
+                $t3.'<attribute id="'.($rAttribute['id'] + 0).'">'.xmlcdata(
645 645
                     $rAttribute['name']
646
-                ) . '</attribute>' . "\n"
646
+                ).'</attribute>'."\n"
647 647
             );
648 648
         }
649
-        fwrite($f, $t2 . '</attributes>' . "\n");
649
+        fwrite($f, $t2.'</attributes>'."\n");
650 650
         sql_free_result($rsAttributes);
651 651
 
652 652
         if ($ocxmlversion >= 13) {
@@ -661,23 +661,23 @@  discard block
 block discarded – undo
661 661
                               ORDER BY `coordinates`.`id` ASC",
662 662
                 $r['id']
663 663
             );
664
-            fwrite($f, $t2 . '<wpts>' . "\n");
664
+            fwrite($f, $t2.'<wpts>'."\n");
665 665
             while ($rWaypoint = sql_fetch_assoc($rsWaypoints)) {
666 666
                 fwrite(
667 667
                     $f,
668
-                    $t3 . '<wpt id="' . ($rWaypoint['id'] + 0) . '" type="' . ($rWaypoint['type'] + 0) . '" typename="' . xmlentities(
668
+                    $t3.'<wpt id="'.($rWaypoint['id'] + 0).'" type="'.($rWaypoint['type'] + 0).'" typename="'.xmlentities(
669 669
                         $rWaypoint['type_name']
670
-                    ) . '" longitude="' . sprintf('%01.5f', $rWaypoint['longitude']) . '" latitude="' . sprintf(
670
+                    ).'" longitude="'.sprintf('%01.5f', $rWaypoint['longitude']).'" latitude="'.sprintf(
671 671
                         '%01.5f',
672 672
                         $rWaypoint['latitude']
673
-                    ) . '">' . xmlcdata($rWaypoint['description']) . '</wpt>' . "\n"
673
+                    ).'">'.xmlcdata($rWaypoint['description']).'</wpt>'."\n"
674 674
                 );
675 675
             }
676
-            fwrite($f, $t2 . '</wpts>' . "\n");
676
+            fwrite($f, $t2.'</wpts>'."\n");
677 677
             sql_free_result($rsWaypoints);
678 678
         }
679 679
 
680
-        fwrite($f, $t1 . '</cache>' . "\n");
680
+        fwrite($f, $t1.'</cache>'."\n");
681 681
     }
682 682
     mysql_free_result($rs);
683 683
 
@@ -697,18 +697,18 @@  discard block
 block discarded – undo
697 697
     while ($r = sql_fetch_array($rs)) {
698 698
         $bAllowView = ($r['allow_user_view'] == 1);
699 699
 
700
-        fwrite($f, $t1 . '<cachedesc>' . "\n");
700
+        fwrite($f, $t1.'<cachedesc>'."\n");
701 701
 
702
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
703
-        fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n");
702
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
703
+        fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n");
704 704
 
705 705
         fwrite(
706 706
             $f,
707
-            $t2 . '<language id="' . $r['language'] . '">' . xmlcdata(
707
+            $t2.'<language id="'.$r['language'].'">'.xmlcdata(
708 708
                 $languages[$r['language']]['de']
709
-            ) . '</language>' . "\n"
709
+            ).'</language>'."\n"
710 710
         );
711
-        fwrite($f, $t2 . '<shortdesc>' . xmlcdata(($bAllowView ? $r['short_desc'] : '')) . '</shortdesc>' . "\n");
711
+        fwrite($f, $t2.'<shortdesc>'.xmlcdata(($bAllowView ? $r['short_desc'] : '')).'</shortdesc>'."\n");
712 712
 
713 713
         $desc = $r['desc'];
714 714
         if ($r['desc_html'] == 0) {
@@ -727,10 +727,10 @@  discard block
 block discarded – undo
727 727
             true
728 728
         );
729 729
         if ($bLicense) {
730
-            fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n");
730
+            fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n");
731 731
         } else {
732 732
             if ($disclaimer != "") {
733
-                $desc .= "<p><em>" . $disclaimer . "</em></p>";
733
+                $desc .= "<p><em>".$disclaimer."</em></p>";
734 734
             }
735 735
         }
736 736
 
@@ -738,21 +738,21 @@  discard block
 block discarded – undo
738 738
 
739 739
         fwrite(
740 740
             $f,
741
-            $t2 . '<desc html="' . (($r['desc_html'] == 1) ? '1' : '0') . '">' . xmlcdata(
741
+            $t2.'<desc html="'.(($r['desc_html'] == 1) ? '1' : '0').'">'.xmlcdata(
742 742
                 ($bAllowView ? $desc : '')
743
-            ) . '</desc>' . "\n"
743
+            ).'</desc>'."\n"
744 744
         );
745 745
 
746 746
         $r['hint'] = mb_ereg_replace('<br />', '', $r['hint']);
747 747
         $r['hint'] = html_entity_decode($r['hint'], ENT_COMPAT, 'UTF-8');
748 748
 
749
-        fwrite($f, $t2 . '<hint>' . xmlcdata(($bAllowView ? $r['hint'] : '')) . '</hint>' . "\n");
749
+        fwrite($f, $t2.'<hint>'.xmlcdata(($bAllowView ? $r['hint'] : '')).'</hint>'."\n");
750 750
         fwrite(
751 751
             $f,
752
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
752
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
753 753
         );
754 754
 
755
-        fwrite($f, $t1 . '</cachedesc>' . "\n");
755
+        fwrite($f, $t1.'</cachedesc>'."\n");
756 756
     }
757 757
     mysql_free_result($rs);
758 758
 
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
         }
794 794
 
795 795
         if ($ocxmlversion >= 13) {
796
-            $teamcomment = ' teamcomment="' . $r['oc_team_comment'] . '"';
796
+            $teamcomment = ' teamcomment="'.$r['oc_team_comment'].'"';
797 797
         } else {
798 798
             $teamcomment = '';
799 799
             if ($r['type'] > 8) {
@@ -802,51 +802,51 @@  discard block
 block discarded – undo
802 802
         }
803 803
 
804 804
         if ($ocxmlversion >= 15) {
805
-            $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"';
805
+            $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"';
806 806
         } else {
807 807
             $statusflags = '';
808 808
         }
809 809
 
810
-        fwrite($f, $t1 . '<cachelog>' . "\n");
811
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
812
-        fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n");
810
+        fwrite($f, $t1.'<cachelog>'."\n");
811
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
812
+        fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n");
813 813
         fwrite(
814 814
             $f,
815
-            $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata(
815
+            $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata(
816 816
                 $r['username']
817
-            ) . '</userid>' . "\n"
817
+            ).'</userid>'."\n"
818 818
         );
819 819
         fwrite(
820 820
             $f,
821
-            $t2 . '<logtype id="' . $r['type'] . '" recommended="' . $r['recommended'] . '"' . $teamcomment . $statusflags . '>' . xmlcdata(
821
+            $t2.'<logtype id="'.$r['type'].'" recommended="'.$r['recommended'].'"'.$teamcomment.$statusflags.'>'.xmlcdata(
822 822
                 $logtypes[$r['type']]
823
-            ) . '</logtype>' . "\n"
823
+            ).'</logtype>'."\n"
824 824
         );
825 825
         fwrite(
826 826
             $f,
827
-            $t2 . '<date>' . date(
827
+            $t2.'<date>'.date(
828 828
                 $ocxmlversion >= 13 ? $sDateformat : $sDateshort,
829 829
                 strtotime($r['date'])
830
-            ) . '</date>' . "\n"
830
+            ).'</date>'."\n"
831 831
         );
832 832
         fwrite(
833 833
             $f,
834
-            $t2 . '<text html="' . $r['text_html'] . '">' . xmlcdata(
834
+            $t2.'<text html="'.$r['text_html'].'">'.xmlcdata(
835 835
                 ($bAllowView ? $r['text'] : '')
836
-            ) . '</text>' . "\n"
836
+            ).'</text>'."\n"
837 837
         );
838
-        fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
838
+        fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n");
839 839
         fwrite(
840 840
             $f,
841
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
841
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
842 842
         );
843 843
         if ($ocxmlversion >= 14) {
844 844
             fwrite(
845 845
                 $f,
846
-                $t2 . '<log_lastmodified>' . date(
846
+                $t2.'<log_lastmodified>'.date(
847 847
                     $sDateformat,
848 848
                     strtotime($r['log_last_modified'])
849
-                ) . '</log_lastmodified>' . "\n"
849
+                ).'</log_lastmodified>'."\n"
850 850
             );
851 851
         }
852 852
 
@@ -861,10 +861,10 @@  discard block
 block discarded – undo
861 861
                 false,
862 862
                 true
863 863
             );
864
-            fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n");
864
+            fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n");
865 865
         }
866 866
 
867
-        fwrite($f, $t1 . '</cachelog>' . "\n");
867
+        fwrite($f, $t1.'</cachelog>'."\n");
868 868
     }
869 869
     mysql_free_result($rs);
870 870
 
@@ -894,30 +894,30 @@  discard block
 block discarded – undo
894 894
     while ($r = sql_fetch_array($rs)) {
895 895
         $bAllowView = ($r['auv'] == 1);
896 896
 
897
-        fwrite($f, $t1 . '<picture>' . "\n");
898
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
899
-        fwrite($f, $t2 . '<url>' . xmlcdata(($bAllowView ? $r['url'] : '')) . '</url>' . "\n");
900
-        fwrite($f, $t2 . '<title>' . xmlcdata(($bAllowView ? $r['title'] : '')) . '</title>' . "\n");
897
+        fwrite($f, $t1.'<picture>'."\n");
898
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
899
+        fwrite($f, $t2.'<url>'.xmlcdata(($bAllowView ? $r['url'] : '')).'</url>'."\n");
900
+        fwrite($f, $t2.'<title>'.xmlcdata(($bAllowView ? $r['title'] : '')).'</title>'."\n");
901 901
         fwrite(
902 902
             $f,
903
-            $t2 . '<object id="' . $r['object_id'] . '" type="' . $r['object_type'] . '" typename="' . xmlentities(
903
+            $t2.'<object id="'.$r['object_id'].'" type="'.$r['object_type'].'" typename="'.xmlentities(
904 904
                 $objecttypes[$r['object_type']]
905
-            ) . '">' . object_id2uuid($r['object_id'], $r['object_type']) . '</object>' . "\n"
905
+            ).'">'.object_id2uuid($r['object_id'], $r['object_type']).'</object>'."\n"
906 906
         );
907 907
         if ($ocxmlversion >= 13) {
908 908
             fwrite(
909 909
                 $f,
910
-                $t2 . '<picattr spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" preview="' . $r['mappreview'] . '" />' . "\n"
910
+                $t2.'<picattr spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" preview="'.$r['mappreview'].'" />'."\n"
911 911
             );
912 912
         } else {
913
-            fwrite($f, $t2 . '<attributes spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" />' . "\n");
913
+            fwrite($f, $t2.'<attributes spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" />'."\n");
914 914
         }
915
-        fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
915
+        fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n");
916 916
         fwrite(
917 917
             $f,
918
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
918
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
919 919
         );
920
-        fwrite($f, $t2 . '<position>' . $r['seq'] . '</position>' . "\n");
920
+        fwrite($f, $t2.'<position>'.$r['seq'].'</position>'."\n");
921 921
 
922 922
         if ($bLicense) {
923 923
             $lang = ($sLanguage != "" ? $sLanguage : $r['language']);
@@ -930,10 +930,10 @@  discard block
 block discarded – undo
930 930
                 false,
931 931
                 true
932 932
             );
933
-            fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n");
933
+            fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n");
934 934
         }
935 935
 
936
-        fwrite($f, $t1 . '</picture>' . "\n");
936
+        fwrite($f, $t1.'</picture>'."\n");
937 937
     }
938 938
     mysql_free_result($rs);
939 939
 
@@ -943,31 +943,31 @@  discard block
 block discarded – undo
943 943
                                    FROM `tmpxml_removedobjects`, `removed_objects` WHERE `removed_objects`.`id`=`tmpxml_removedobjects`.`id`'
944 944
     );
945 945
     while ($r = sql_fetch_array($rs)) {
946
-        fwrite($f, $t1 . '<removedobject>' . "\n");
947
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '" />' . "\n");
946
+        fwrite($f, $t1.'<removedobject>'."\n");
947
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'" />'."\n");
948 948
         fwrite(
949 949
             $f,
950
-            $t2 . '<object id="' . $r['localid'] . '" type="' . $r['type'] . '" typename="' . xmlentities(
950
+            $t2.'<object id="'.$r['localid'].'" type="'.$r['type'].'" typename="'.xmlentities(
951 951
                 $objecttypes[$r['type']]
952
-            ) . '">' . $r['uuid'] . '</object>' . "\n"
952
+            ).'">'.$r['uuid'].'</object>'."\n"
953 953
         );
954
-        fwrite($f, $t2 . '<removeddate>' . date($sDateformat, strtotime($r['removed_date'])) . '</removeddate>' . "\n");
955
-        fwrite($f, $t1 . '</removedobject>' . "\n");
954
+        fwrite($f, $t2.'<removeddate>'.date($sDateformat, strtotime($r['removed_date'])).'</removeddate>'."\n");
955
+        fwrite($f, $t1.'</removedobject>'."\n");
956 956
     }
957 957
     mysql_free_result($rs);
958 958
 
959 959
     if ($bOcXmlTag == '1') {
960
-        fwrite($f, '</oc11xml>' . "\n");
960
+        fwrite($f, '</oc11xml>'."\n");
961 961
     }
962 962
 
963 963
     fclose($f);
964 964
 
965
-    $rel_xmlfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml';
966
-    $rel_zipfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid;
965
+    $rel_xmlfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml';
966
+    $rel_zipfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid;
967 967
 
968 968
     // zippen und url-redirect
969 969
     if ($ziptype == '0') {
970
-        tpl_redirect($zip_wwwdir . $rel_xmlfile);
970
+        tpl_redirect($zip_wwwdir.$rel_xmlfile);
971 971
         exit;
972 972
     } else {
973 973
         if ($ziptype == 'zip') {
@@ -987,17 +987,17 @@  discard block
 block discarded – undo
987 987
 
988 988
     $call =
989 989
         $safemode_zip
990
-        . ' --type=' . escapeshellcmd($ziptype)
991
-        . ' --src=' . escapeshellcmd($rel_xmlfile)
992
-        . ' --dst=' . escapeshellcmd($rel_zipfile);
990
+        . ' --type='.escapeshellcmd($ziptype)
991
+        . ' --src='.escapeshellcmd($rel_xmlfile)
992
+        . ' --dst='.escapeshellcmd($rel_zipfile);
993 993
     system($call);
994 994
 
995 995
     // datei vorhanden?
996
-    if (!file_exists($zip_basedir . $rel_zipfile)) {
996
+    if (!file_exists($zip_basedir.$rel_zipfile)) {
997 997
         die('all ok, but zip failed - internal server error');
998 998
     }
999 999
 
1000
-    tpl_redirect($zip_wwwdir . $rel_zipfile);
1000
+    tpl_redirect($zip_wwwdir.$rel_zipfile);
1001 1001
 
1002 1002
     exit;
1003 1003
 }
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
             }
1050 1050
             sql(
1051 1051
                 "INSERT INTO xmlsession_data (`session_id`, `object_type`, `object_id`)
1052
-                 SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield . " >= '&2' AND `status`!=5",
1052
+                 SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield." >= '&2' AND `status`!=5",
1053 1053
                 $sessionid,
1054 1054
                 $sModifiedSince
1055 1055
             );
@@ -1139,35 +1139,35 @@  discard block
 block discarded – undo
1139 1139
                         'longitude',
1140 1140
                         'latitude',
1141 1141
                         'cache_coordinates'
1142
-                    ) . ' `distance` ';
1142
+                    ).' `distance` ';
1143 1143
                 $sql .= 'FROM `caches`, `cache_coordinates` WHERE ';
1144 1144
                 $sql .= '`cache_coordinates`.`cache_id`=`caches`.`cache_id`';
1145 1145
                 $sql .= ' AND `caches`.`status`!=5';
1146
-                $sql .= ' AND `cache_coordinates`.`latitude` > ' .
1146
+                $sql .= ' AND `cache_coordinates`.`latitude` > '.
1147 1147
                     geomath::getMinLat(
1148 1148
                         $selection['lon'],
1149 1149
                         $selection['lat'],
1150 1150
                         $selection['distance']
1151 1151
                     );
1152
-                $sql .= ' AND `cache_coordinates`.`latitude` < ' .
1152
+                $sql .= ' AND `cache_coordinates`.`latitude` < '.
1153 1153
                     geomath::getMaxLat(
1154 1154
                         $selection['lon'],
1155 1155
                         $selection['lat'],
1156 1156
                         $selection['distance']
1157 1157
                     );
1158
-                $sql .= ' AND `cache_coordinates`.`longitude` >' .
1158
+                $sql .= ' AND `cache_coordinates`.`longitude` >'.
1159 1159
                     geomath::getMinLon(
1160 1160
                         $selection['lon'],
1161 1161
                         $selection['lat'],
1162 1162
                         $selection['distance']
1163 1163
                     );
1164
-                $sql .= ' AND `cache_coordinates`.`longitude` < ' .
1164
+                $sql .= ' AND `cache_coordinates`.`longitude` < '.
1165 1165
                     geomath::getMaxLon(
1166 1166
                         $selection['lon'],
1167 1167
                         $selection['lat'],
1168 1168
                         $selection['distance']
1169 1169
                     );
1170
-                $sql .= ' HAVING `distance` < ' . ($selection['distance'] + 0);
1170
+                $sql .= ' HAVING `distance` < '.($selection['distance'] + 0);
1171 1171
 
1172 1172
                 sql($sql);
1173 1173
             } else {
@@ -1309,7 +1309,7 @@  discard block
 block discarded – undo
1309 1309
 //    echo $startat . ' ' . $endat . '<br><br>';
1310 1310
 //    echo '<table>';
1311 1311
 //    echo '<tr><td>sql-start</td><td>sql-count</td><td>count</td><td>begin</td><td>end</td></tr>';
1312
-    for ($i = 0; $i < 6; $i ++) {
1312
+    for ($i = 0; $i < 6; $i++) {
1313 1313
         if (($startat >= $recordnr[$i]) && ($startat + 500 < $recordnr[$i + 1])) {
1314 1314
             if ($recordnr[$i + 1] - $startat > 500) {
1315 1315
                 $limits[$i] = ['start' => $startat - $recordnr[$i], 'count' => 500];
@@ -1412,7 +1412,7 @@  discard block
 block discarded – undo
1412 1412
         $str = output_convert($str);
1413 1413
         $str = mb_ereg_replace(']]>', ']] >', $str);
1414 1414
 
1415
-        return '<![CDATA[' . filterevilchars($str) . ']]>';
1415
+        return '<![CDATA['.filterevilchars($str).']]>';
1416 1416
     } else {
1417 1417
         return xmlentities($str);
1418 1418
     }
@@ -1431,7 +1431,7 @@  discard block
 block discarded – undo
1431 1431
     $from[4] = '\'';
1432 1432
     $to[4] = '&apos;';
1433 1433
 
1434
-    for ($i = 0; $i <= 4; $i ++) {
1434
+    for ($i = 0; $i <= 4; $i++) {
1435 1435
         $str = mb_ereg_replace($from[$i], $to[$i], $str);
1436 1436
     }
1437 1437
 
@@ -1510,13 +1510,13 @@  discard block
 block discarded – undo
1510 1510
 
1511 1511
     $hDir = opendir($path);
1512 1512
     if ($hDir === false) {
1513
-        ++ $notunlinked;
1513
+        ++$notunlinked;
1514 1514
     } else {
1515 1515
         while (false !== ($file = readdir($hDir))) {
1516 1516
             if (($file != '.') && ($file != '..')) {
1517
-                if (is_dir($path . $file)) {
1518
-                    if (unlinkrecursiv($path . $file . '/') == false) {
1519
-                        $notunlinked ++;
1517
+                if (is_dir($path.$file)) {
1518
+                    if (unlinkrecursiv($path.$file.'/') == false) {
1519
+                        $notunlinked++;
1520 1520
                     }
1521 1521
                 } else {
1522 1522
                     if ((mb_substr($file, - 4) == '.zip') ||
@@ -1524,9 +1524,9 @@  discard block
 block discarded – undo
1524 1524
                         (mb_substr($file, - 4) == '.bz2') ||
1525 1525
                         (mb_substr($file, - 4) == '.xml')
1526 1526
                     ) {
1527
-                        @unlink($path . $file);
1527
+                        @unlink($path.$file);
1528 1528
                     } else {
1529
-                        $notunlinked ++;
1529
+                        $notunlinked++;
1530 1530
                     }
1531 1531
                 }
1532 1532
             }
Please login to merge, or discard this patch.
local/devel/find_unicode_boms.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -39,6 +39,9 @@
 block discarded – undo
39 39
 }
40 40
 
41 41
 
42
+/**
43
+ * @param string $path
44
+ */
42 45
 function testforbom($path)
43 46
 {
44 47
     $filestart = file_get_contents($path, false, null, 0, 2);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *  Searches for Unicode byte order marks in code and template files
8 8
  ***************************************************************************/
9 9
 
10
-chdir(__DIR__ . '/../../htdocs');
10
+chdir(__DIR__.'/../../htdocs');
11 11
 require_once 'lib2/cli.inc.php';
12 12
 
13 13
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     $hDir = opendir($dir);
26 26
     if ($hDir !== false) {
27 27
         while (($file = readdir($hDir)) !== false) {
28
-            $path = $dir . '/' . $file;
28
+            $path = $dir.'/'.$file;
29 29
             if (is_dir($path) && substr($file, 0, 1) !== '.' && $subdirs) {
30 30
                 scan($path, $subdirs);
31 31
             } else {
Please login to merge, or discard this patch.
local/ocxml11client/index.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -1281,11 +1281,19 @@
 block discarded – undo
1281 1281
     }
1282 1282
 }
1283 1283
 
1284
+/**
1285
+ * @param string $recordtype
1286
+ * @param string $info
1287
+ */
1284 1288
 function importError($recordtype, $uuid, $r, $info)
1285 1289
 {
1286 1290
     echo 'error: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
1287 1291
 }
1288 1292
 
1293
+/**
1294
+ * @param string $recordtype
1295
+ * @param string $info
1296
+ */
1289 1297
 function importWarn($recordtype, $uuid, $r, $info)
1290 1298
 {
1291 1299
     echo 'warn: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
Please login to merge, or discard this patch.
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
  * - Test mit aktuellem OC.de-Stand
28 28
  ***************************************************************************/
29 29
 
30
-$rootpath = __DIR__ . '/../../htdocs/';
30
+$rootpath = __DIR__.'/../../htdocs/';
31 31
 
32 32
 // chdir to proper directory (needed for cronjobs)
33 33
 chdir(substr(realpath($_SERVER['PHP_SELF']), 0, strrpos(realpath($_SERVER['PHP_SELF']), '/')));
34 34
 
35
-require_once $rootpath . 'lib/clicompatbase.inc.php';
35
+require_once $rootpath.'lib/clicompatbase.inc.php';
36 36
 require_once 'xml2array.inc.php';
37 37
 require_once 'settings.php';
38 38
 
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
     $nFileNr = 0;
68 68
     $rs = sql('SELECT `id`, `url` FROM `pictures` WHERE `local`=0');
69 69
     while ($r = sql_fetch_array($rs)) {
70
-        $nFileNr ++;
70
+        $nFileNr++;
71 71
         $fileparts = mb_split('/', $r['url']);
72 72
         $filename = $fileparts[count($fileparts) - 1];
73 73
 
74
-        echo 'Downloading file ' . $nFileNr . ' of ' . $rCount['c'] . ': ' . $filename . "\n";
74
+        echo 'Downloading file '.$nFileNr.' of '.$rCount['c'].': '.$filename."\n";
75 75
 
76 76
         $success = true;
77
-        if (!file_exists($opt['pictures']['directory'] . $filename)) {
78
-            if (!@copy($r['url'], $opt['pictures']['directory'] . $filename)) {
79
-                echo 'error: Download nicht erfolgreich' . "\n";
77
+        if (!file_exists($opt['pictures']['directory'].$filename)) {
78
+            if (!@copy($r['url'], $opt['pictures']['directory'].$filename)) {
79
+                echo 'error: Download nicht erfolgreich'."\n";
80 80
                 $success = false;
81 81
             }
82 82
         }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         if ($success == true) {
85 85
             sql(
86 86
                 "UPDATE `pictures` SET `local`=1, `url`='&1' WHERE `id`='&2'",
87
-                $opt['pictures']['url'] . $filename,
87
+                $opt['pictures']['url'].$filename,
88 88
                 $r['id']
89 89
             );
90 90
         }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
     if ($opt['session'] == 1) {
198 198
         // records abfragen
199
-        $sessionfile = $opt['tmpdir'] . 'session.xml';
199
+        $sessionfile = $opt['tmpdir'].'session.xml';
200 200
         if (file_exists($sessionfile)) {
201 201
             unlink($sessionfile);
202 202
         }
@@ -215,21 +215,21 @@  discard block
 block discarded – undo
215 215
         $recordscount += $session['OCXMLSESSION']['RECORDS']['PICTURE'];
216 216
         $recordscount += $session['OCXMLSESSION']['RECORDS']['REMOVEOBJECT'];
217 217
 
218
-        echo 'Abruf seit ' . $lastUpdate . "\n";
218
+        echo 'Abruf seit '.$lastUpdate."\n";
219 219
         echo "------------------------\n";
220
-        echo 'Session-Id: ' . $sessionid . "\n";
221
-        echo 'User: ' . $session['OCXMLSESSION']['RECORDS']['USER'] . "\n";
222
-        echo 'Cache: ' . $session['OCXMLSESSION']['RECORDS']['CACHE'] . "\n";
223
-        echo 'Cachdesc: ' . $session['OCXMLSESSION']['RECORDS']['CACHEDESC'] . "\n";
224
-        echo 'Cachelog: ' . $session['OCXMLSESSION']['RECORDS']['CACHELOG'] . "\n";
225
-        echo 'Picture: ' . $session['OCXMLSESSION']['RECORDS']['PICTURE'] . "\n";
226
-        echo 'Removedobject: ' . $session['OCXMLSESSION']['RECORDS']['REMOVEOBJECT'] . "\n";
220
+        echo 'Session-Id: '.$sessionid."\n";
221
+        echo 'User: '.$session['OCXMLSESSION']['RECORDS']['USER']."\n";
222
+        echo 'Cache: '.$session['OCXMLSESSION']['RECORDS']['CACHE']."\n";
223
+        echo 'Cachdesc: '.$session['OCXMLSESSION']['RECORDS']['CACHEDESC']."\n";
224
+        echo 'Cachelog: '.$session['OCXMLSESSION']['RECORDS']['CACHELOG']."\n";
225
+        echo 'Picture: '.$session['OCXMLSESSION']['RECORDS']['PICTURE']."\n";
226
+        echo 'Removedobject: '.$session['OCXMLSESSION']['RECORDS']['REMOVEOBJECT']."\n";
227 227
         echo "------------------------\n";
228
-        echo 'Summe: ' . $recordscount . "\n";
228
+        echo 'Summe: '.$recordscount."\n";
229 229
 
230 230
         $filescount = ($recordscount + (500 - $recordscount % 500)) / 500;
231 231
 
232
-        echo 'Anzahl der Pakete: ' . $filescount . "\n";
232
+        echo 'Anzahl der Pakete: '.$filescount."\n";
233 233
         echo "\n";
234 234
 
235 235
         if ($recordscount == 0) {
@@ -237,20 +237,20 @@  discard block
 block discarded – undo
237 237
             exit;
238 238
         }
239 239
 
240
-        for ($i = 1; $i <= $filescount; $i ++) {
241
-            echo "Download Paket: " . $i . ' von ' . $filescount . "\n";
240
+        for ($i = 1; $i <= $filescount; $i++) {
241
+            echo "Download Paket: ".$i.' von '.$filescount."\n";
242 242
 
243 243
             $fileurl = $opt['url_getsession'];
244 244
             $fileurl = mb_ereg_replace('{sessionid}', $sessionid, $fileurl);
245 245
             $fileurl = mb_ereg_replace('{file}', $i, $fileurl);
246 246
             $fileurl = mb_ereg_replace('{zip}', $opt['zip'], $fileurl);
247
-            $target = $opt['tmpdir'] . $sessionid . '-' . sprintf('%04d', $i) . $fileext;
247
+            $target = $opt['tmpdir'].$sessionid.'-'.sprintf('%04d', $i).$fileext;
248 248
 
249 249
             copy($fileurl, $target);
250 250
         }
251 251
     } else {
252
-        echo 'Download ...' . "\n";
253
-        $target = $opt['tmpdir'] . date('YmdHis') . $fileext;
252
+        echo 'Download ...'."\n";
253
+        $target = $opt['tmpdir'].date('YmdHis').$fileext;
254 254
         copy($url, $target);
255 255
     }
256 256
 }
@@ -262,24 +262,24 @@  discard block
 block discarded – undo
262 262
     // alle zips entpacken
263 263
     $hDir = opendir($opt['tmpdir']);
264 264
     while (false !== ($file = readdir($hDir))) {
265
-        if (is_file($opt['tmpdir'] . $file)) {
265
+        if (is_file($opt['tmpdir'].$file)) {
266 266
             $bCopy = false;
267 267
             if (mb_substr($file, mb_strrpos($file, '.')) == '.zip') {
268
-                echo 'Unzipping file ' . $file . "\n";
268
+                echo 'Unzipping file '.$file."\n";
269 269
                 system(
270
-                    $opt['unzip'] . ' --type=zip --src="' . $opt['rel_tmpdir'] . '/' . $file . '" --dst="' . $opt['rel_tmpdir'] . '"'
270
+                    $opt['unzip'].' --type=zip --src="'.$opt['rel_tmpdir'].'/'.$file.'" --dst="'.$opt['rel_tmpdir'].'"'
271 271
                 );
272 272
             } else {
273 273
                 if (mb_substr($file, mb_strrpos($file, '.')) == '.gz') {
274
-                    echo 'Unzipping file ' . $file . "\n";
274
+                    echo 'Unzipping file '.$file."\n";
275 275
                     system(
276
-                        $opt['unzip'] . ' --type=gzip --src="' . $opt['rel_tmpdir'] . '/' . $file . '" --dst="' . $opt['rel_tmpdir'] . '"'
276
+                        $opt['unzip'].' --type=gzip --src="'.$opt['rel_tmpdir'].'/'.$file.'" --dst="'.$opt['rel_tmpdir'].'"'
277 277
                     );
278 278
                 } else {
279 279
                     if (mb_substr($file, mb_strrpos($file, '.')) == '.bz2') {
280
-                        echo 'Unzipping file ' . $file . "\n";
280
+                        echo 'Unzipping file '.$file."\n";
281 281
                         system(
282
-                            $opt['unzip'] . ' --type=bzip2 --src="' . $opt['rel_tmpdir'] . '/' . $file . '" --dst="' . $opt['rel_tmpdir'] . '"'
282
+                            $opt['unzip'].' --type=bzip2 --src="'.$opt['rel_tmpdir'].'/'.$file.'" --dst="'.$opt['rel_tmpdir'].'"'
283 283
                         );
284 284
                     } else {
285 285
                         if (mb_substr($file, mb_strrpos($file, '.')) == '.xml') {
@@ -291,16 +291,16 @@  discard block
 block discarded – undo
291 291
 
292 292
             // und jetzt die gezippte Datei verschieben
293 293
             $archivdir = $opt['archivdir'];
294
-            $archivdir .= $opt['curdb'] . '/';
294
+            $archivdir .= $opt['curdb'].'/';
295 295
 
296 296
             if (!is_dir($archivdir)) {
297 297
                 mkdir($archivdir);
298 298
             }
299 299
 
300 300
             if ($bCopy == true) {
301
-                copy($opt['tmpdir'] . $file, $archivdir . '/' . $file);
301
+                copy($opt['tmpdir'].$file, $archivdir.'/'.$file);
302 302
             } else {
303
-                rename($opt['tmpdir'] . $file, $archivdir . '/' . $file);
303
+                rename($opt['tmpdir'].$file, $archivdir.'/'.$file);
304 304
             }
305 305
         }
306 306
     }
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
 
316 316
     $hDir = opendir($opt['tmpdir']);
317 317
     while (false !== ($file = readdir($hDir))) {
318
-        if (is_file($opt['tmpdir'] . $file)) {
318
+        if (is_file($opt['tmpdir'].$file)) {
319 319
             if ($file != '.cvsignore') {
320
-                $files[] = $opt['tmpdir'] . $file;
320
+                $files[] = $opt['tmpdir'].$file;
321 321
             }
322 322
         }
323 323
     }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 
332 332
 function importxmlfile($file)
333 333
 {
334
-    echo 'Importing file ' . $file . "\n";
334
+    echo 'Importing file '.$file."\n";
335 335
 
336 336
     $xmlReader = new xmlReader();
337 337
     $xmlReader->open($file);
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
                             if ($sSubElement != '') {
412 412
                                 // vorheriges element zuerst schlißen
413 413
                                 $sSubElement = '';
414
-                                $nRecursionLevel --;
414
+                                $nRecursionLevel--;
415 415
                             }
416 416
 
417 417
                             $sSubElement = mb_strtoupper($xmlReader->name);
418
-                            $nRecursionLevel ++;
418
+                            $nRecursionLevel++;
419 419
 
420 420
                             // attribute auslesen
421 421
                             if ($xmlReader->moveToFirstAttribute()) {
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                         } else {
433 433
                             if ($xmlReader->nodeType == XMLReader::END_ELEMENT) {
434 434
                                 $sSubElement = '';
435
-                                $nRecursionLevel --;
435
+                                $nRecursionLevel--;
436 436
                             }
437 437
                         }
438 438
                     }
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
                     ImportRemovedObjectArray($node['REMOVEDOBJECT']);
460 460
                     break;
461 461
                 default:
462
-                    echo 'Unknown Element "' . $xmlReader->name . '", skipping' . "\n";
462
+                    echo 'Unknown Element "'.$xmlReader->name.'", skipping'."\n";
463 463
                     break;
464 464
             }
465 465
         }
@@ -481,9 +481,9 @@  discard block
 block discarded – undo
481 481
 
482 482
     $hDir = opendir($opt['tmpdir']);
483 483
     while (false !== ($file = readdir($hDir))) {
484
-        if (is_file($opt['tmpdir'] . $file)) {
484
+        if (is_file($opt['tmpdir'].$file)) {
485 485
             if ($file != '.cvsignore') {
486
-                unlink($opt['tmpdir'] . $file);
486
+                unlink($opt['tmpdir'].$file);
487 487
             }
488 488
         }
489 489
     }
@@ -501,14 +501,14 @@  discard block
 block discarded – undo
501 501
         // andere DB connecten?
502 502
         if (mb_substr($arg, 0, 5) == '--db=') {
503 503
             if (!is_numeric(mb_substr($arg, 5))) {
504
-                die('invalid alternative DB' . "\n");
504
+                die('invalid alternative DB'."\n");
505 505
             }
506 506
 
507 507
             $nDb = mb_substr($arg, 5);
508 508
 
509 509
             if ($nDb != 0) {
510 510
                 if (!isset($opt['db'][$nDb])) {
511
-                    die('invalid alternative DB' . "\n");
511
+                    die('invalid alternative DB'."\n");
512 512
                 }
513 513
 
514 514
                 mysql_close($dblink);
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                     sql("SET NAMES 'utf8'");
518 518
                     sql('USE `&1`', $opt['db'][1]['name']);
519 519
                 } else {
520
-                    die('Connect to alternative DB failed' . "\n");
520
+                    die('Connect to alternative DB failed'."\n");
521 521
                 }
522 522
 
523 523
                 $opt['curdb'] = $nDb;
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
             sql("SET NAMES 'utf8'");
532 532
             sql('USE `&1`', $dbname);
533 533
         } else {
534
-            die('Connect to alternative DB failed' . "\n");
534
+            die('Connect to alternative DB failed'."\n");
535 535
         }
536 536
     }
537 537
 }
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
         !isset($r['USERNAME']['__DATA']) ||
545 545
         !isset($r['LASTMODIFIED']['__DATA'])
546 546
     ) {
547
-        echo 'warn: ImportUserArray required element not defined' . "\n";
547
+        echo 'warn: ImportUserArray required element not defined'."\n";
548 548
 
549 549
         return;
550 550
     }
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
         !isset($r['DATECREATED']['__DATA']) ||
638 638
         !isset($r['LASTMODIFIED']['__DATA'])
639 639
     ) {
640
-        echo 'warn: ImportCacheArray required element not defined' . "\n";
640
+        echo 'warn: ImportCacheArray required element not defined'."\n";
641 641
 
642 642
         return;
643 643
     }
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
         !isset($r['LANGUAGE']['__ATTR']['ID']) ||
808 808
         !isset($r['LASTMODIFIED']['__DATA'])
809 809
     ) {
810
-        echo 'error: ImportCacheDescArray required element not defined' . "\n";
810
+        echo 'error: ImportCacheDescArray required element not defined'."\n";
811 811
 
812 812
         return;
813 813
     }
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
         !isset($r['DATECREATED']['__DATA']) ||
965 965
         !isset($r['LASTMODIFIED']['__DATA'])
966 966
     ) {
967
-        echo 'error: ImportCachelogArray required element not defined' . "\n";
967
+        echo 'error: ImportCachelogArray required element not defined'."\n";
968 968
 
969 969
         return;
970 970
     }
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
 
996 996
     // logtype gültig?
997 997
     if (sqlValue(
998
-        "SELECT COUNT(*) FROM `log_types` WHERE `id`='" . sql_escape($r['LOGTYPE']['__ATTR']['ID']) . "'",
998
+        "SELECT COUNT(*) FROM `log_types` WHERE `id`='".sql_escape($r['LOGTYPE']['__ATTR']['ID'])."'",
999 999
         0
1000 1000
     ) == 0) {
1001 1001
         importError('cachelog', $r['ID']['__DATA'], $r, 'Logtype not valid, skipping');
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
         !isset($r['DATECREATED']['__DATA']) ||
1069 1069
         !isset($r['LASTMODIFIED']['__DATA'])
1070 1070
     ) {
1071
-        echo 'error: ImportPictureArray required element not defined ' . "\n";
1071
+        echo 'error: ImportPictureArray required element not defined '."\n";
1072 1072
 
1073 1073
         return;
1074 1074
     }
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
         !isset($r['OBJECT']['__DATA']) ||
1170 1170
         !isset($r['REMOVEDDATE']['__DATA'])
1171 1171
     ) {
1172
-        echo 'error: ImportRemovedObjectArray required element not defined' . "\n";
1172
+        echo 'error: ImportRemovedObjectArray required element not defined'."\n";
1173 1173
 
1174 1174
         return;
1175 1175
     }
@@ -1281,12 +1281,12 @@  discard block
 block discarded – undo
1281 1281
 
1282 1282
 function importError($recordtype, $uuid, $r, $info)
1283 1283
 {
1284
-    echo 'error: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
1284
+    echo 'error: '.$recordtype.' ('.$uuid.'): '.$info."\n";
1285 1285
 }
1286 1286
 
1287 1287
 function importWarn($recordtype, $uuid, $r, $info)
1288 1288
 {
1289
-    echo 'warn: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
1289
+    echo 'warn: '.$recordtype.' ('.$uuid.'): '.$info."\n";
1290 1290
 }
1291 1291
 
1292 1292
 function restorevalues()
Please login to merge, or discard this patch.
local/ocxml11client/xml2array.inc.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@
 block discarded – undo
26 26
         $this->stack_ref =& $this->stack[count($this->stack) - 1];
27 27
     }
28 28
 
29
+    /**
30
+     * @param false|string $strInputXML
31
+     */
29 32
     public function parse($strInputXML)
30 33
     {
31 34
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@
 block discarded – undo
16 16
 
17 17
     public function push_pos(&$pos)
18 18
     {
19
-        $this->stack[count($this->stack)] =& $pos;
20
-        $this->stack_ref =& $pos;
19
+        $this->stack[count($this->stack)] = & $pos;
20
+        $this->stack_ref = & $pos;
21 21
     }
22 22
 
23 23
     public function pop_pos()
24 24
     {
25 25
         unset($this->stack[count($this->stack) - 1]);
26
-        $this->stack_ref =& $this->stack[count($this->stack) - 1];
26
+        $this->stack_ref = & $this->stack[count($this->stack) - 1];
27 27
     }
28 28
 
29 29
     public function parse($strInputXML)
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/block.nocache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         if (!isset($counter[$name])) {
33 33
             $counter[$name] = 0;
34 34
         }
35
-        $counter[$name] ++;
35
+        $counter[$name]++;
36 36
 
37 37
         if ($smarty->_cache_including) {
38 38
             $param = isset($smarty->_cache_info['cached_vars'][$name][$counter[$name]]) ? $smarty->_cache_info['cached_vars'][$name][$counter[$name]] : [];
Please login to merge, or discard this patch.