Completed
Push — master ( 182b8c...09455a )
by Thomas
07:02
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
                     }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 if ($mailadr != '') {
209 209
                     if (is_existent_maildomain(getToMailDomain($mailadr))) {
210 210
                         $language = $rUser['language'] ? $rUser['language'] : $opt['template']['default']['locale'];
211
-                        $mailsubject = '[' . $maildomain . '] ' . $translate->t(
211
+                        $mailsubject = '['.$maildomain.'] '.$translate->t(
212 212
                                 'Your watchlist of',
213 213
                                 '',
214 214
                                 basename(__FILE__),
@@ -216,11 +216,11 @@  discard block
 block discarded – undo
216 216
                                 '',
217 217
                                 1,
218 218
                                 $language
219
-                            ) . ' ' . date($opt['locale'][$language]['format']['phpdate']);
219
+                            ).' '.date($opt['locale'][$language]['format']['phpdate']);
220 220
                         mb_send_mail($mailadr, $mailsubject, $mailbody, $email_headers);
221 221
 
222 222
                         // logentry($module, $eventid, $userid, $objectid1, $objectid2, $logtext, $details)
223
-                        logentry('watchlist', 2, $rUser['user_id'], 0, 0, 'Sending mail to ' . $mailadr, []);
223
+                        logentry('watchlist', 2, $rUser['user_id'], 0, 0, 'Sending mail to '.$mailadr, []);
224 224
                     }
225 225
                 }
226 226
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 
320 320
     $logtext = html2plaintext($rLog['text'], $rLog['text_html'] == 0, EMAIL_LINEWRAP);
321 321
 
322
-    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
322
+    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
323 323
     if (!$language) {
324 324
         $language = $opt['template']['default']['locale'];
325 325
     }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         $dateformat = $opt['locale'][$language]['format']['phpdatetime'];
330 330
     }
331 331
 
332
-    $watchtext = '{date} ' . $translate->t(
332
+    $watchtext = '{date} '.$translate->t(
333 333
             '{user} has logged your cache "{cachename}":',
334 334
             '',
335 335
             basename(__FILE__),
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             '',
338 338
             1,
339 339
             $language
340
-        ) . ' {action}{maintenance_flags}' . "\n" . '{shortlink_url}{wp_oc}' . "\n\n" . '{text}' . "\n\n\n\n";
340
+        ).' {action}{maintenance_flags}'."\n".'{shortlink_url}{wp_oc}'."\n\n".'{text}'."\n\n\n\n";
341 341
 
342 342
     $watchtext = mb_ereg_replace('{date}', date($dateformat, strtotime($rLog['logdate'])), $watchtext);
343 343
     $watchtext = mb_ereg_replace('{wp_oc}', $rLog['wp_oc'], $watchtext);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     $watchtext = mb_ereg_replace('{action}', get_logtype_name($rLog['type'], $language), $watchtext);
348 348
     $watchtext = insert_maintenance_flags($rLog, $language, $watchtext);
349 349
 
350
-    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
350
+    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
351 351
     $urls = get_site_urls($domain);
352 352
     if ($urls['shortlink_url']) {
353 353
         $watchtext = mb_ereg_replace("{shortlink_url}", $urls['shortlink_url'], $watchtext);
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 
402 402
     $logtext = html2plaintext($rLog['text'], $rLog['text_html'] == 0, EMAIL_LINEWRAP);
403 403
 
404
-    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
404
+    $language = sqlValue("SELECT `language` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
405 405
     if (!$language) {
406 406
         $language = $opt['template']['default']['locale'];
407 407
     }
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         $dateformat = $opt['locale'][$language]['format']['phpdatetime'];
412 412
     }
413 413
 
414
-    $watchtext = '{date} ' . $translate->t(
414
+    $watchtext = '{date} '.$translate->t(
415 415
             '{user} has logged the cache "{cachename}":',
416 416
             '',
417 417
             basename(__FILE__),
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
             '',
420 420
             1,
421 421
             $language
422
-        ) . ' {action}{maintenance_flags}' . "\n" . '{shortlink_url}{wp_oc}' . "\n{cachelists}\n" . '{text}' . "\n\n\n\n";
422
+        ).' {action}{maintenance_flags}'."\n".'{shortlink_url}{wp_oc}'."\n{cachelists}\n".'{text}'."\n\n\n\n";
423 423
 
424 424
     $watchtext = mb_ereg_replace('{date}', date($dateformat, strtotime($rLog['logdate'])), $watchtext);
425 425
     $watchtext = mb_ereg_replace('{wp_oc}', $rLog['wp_oc'], $watchtext);
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
                     '',
452 452
                     1,
453 453
                     $language
454
-                ) . ' ' . $cachelist_names[0] . "\n";
454
+                ).' '.$cachelist_names[0]."\n";
455 455
             break;
456 456
         default:
457 457
             $cachelists = $translate->t(
@@ -462,11 +462,11 @@  discard block
 block discarded – undo
462 462
                     '',
463 463
                     1,
464 464
                     $language
465
-                ) . ' ' . implode(', ', $cachelist_names) . "\n";
465
+                ).' '.implode(', ', $cachelist_names)."\n";
466 466
     }
467 467
     $watchtext = mb_ereg_replace('{cachelists}', $cachelists, $watchtext);
468 468
 
469
-    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='" . sql_escape($user_id) . "'", null);
469
+    $domain = sqlValue("SELECT `domain` FROM `user` WHERE `user_id`='".sql_escape($user_id)."'", null);
470 470
     $urls = get_site_urls($domain);
471 471
     if ($urls['shortlink_url']) {
472 472
         $watchtext = mb_ereg_replace("{shortlink_url}", $urls['shortlink_url'], $watchtext);
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
     }
558 558
 
559 559
     if (file_exists($PidFile)) {
560
-        echo "Error: Pidfile (" . $PidFile . ") already present at " . __FILE__ . ":" . __LINE__ . "!\n";
560
+        echo "Error: Pidfile (".$PidFile.") already present at ".__FILE__.":".__LINE__."!\n";
561 561
 
562 562
         return false;
563 563
     } else {
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 
568 568
             return true;
569 569
         } else {
570
-            echo "can't create Pidfile $PidFile at " . __FILE__ . ":" . __LINE__ . "!\n";
570
+            echo "can't create Pidfile $PidFile at ".__FILE__.":".__LINE__."!\n";
571 571
 
572 572
             return false;
573 573
         }
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
         $pid_daemon = fgets($pidfile, 20);
584 584
         fclose($pidfile);
585 585
 
586
-        $pid_daemon = (int) $pid_daemon;
586
+        $pid_daemon = (int)$pid_daemon;
587 587
 
588 588
         // process running?
589 589
         if (posix_kill($pid_daemon, 0)) {
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
             false;
593 593
         } else {
594 594
             // no, remove pid_file
595
-            echo "process not running, removing old pid_file (" . $PidFile . ")\n";
595
+            echo "process not running, removing old pid_file (".$PidFile.")\n";
596 596
             unlink($PidFile);
597 597
 
598 598
             return true;
@@ -614,10 +614,10 @@  discard block
 block discarded – undo
614 614
             unlink($PidFile);
615 615
         }
616 616
     } else {
617
-        echo "Error: can't delete own pidfile (" . $PidFile . ") at " . __FILE__ . ":" . __LINE__ . "!\n";
617
+        echo "Error: can't delete own pidfile (".$PidFile.") at ".__FILE__.":".__LINE__."!\n";
618 618
     }
619 619
 
620 620
     if ($message) {
621
-        echo $message . "\n";
621
+        echo $message."\n";
622 622
     }
623 623
 }
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.
Spacing   +167 added lines, -167 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
     }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     if (isset($_REQUEST['country'])) {
193 193
         $country = $_REQUEST['country'];
194 194
 
195
-        if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\'' . sql_escape($country) . '\'', 0) != 1) {
195
+        if (sqlValue('SELECT COUNT(*) FROM `countries` WHERE `short`=\''.sql_escape($country).'\'', 0) != 1) {
196 196
             die('Unknown country');
197 197
         }
198 198
 
@@ -237,13 +237,13 @@  discard block
 block discarded – undo
237 237
                 $selection['type'] = 3;
238 238
                 if (isset($_REQUEST['wp'])) {
239 239
                     $selection['cacheid'] = sqlValue(
240
-                        "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='" . sql_escape($_REQUEST['wp']) . "'",
240
+                        "SELECT `cache_id` FROM `caches` WHERE `wp_oc`='".sql_escape($_REQUEST['wp'])."'",
241 241
                         0
242 242
                     );
243 243
                 } else {
244 244
                     if (isset($_REQUEST['uuid'])) {
245 245
                         $selection['cacheid'] = sqlValue(
246
-                            "SELECT `cache_id` FROM `caches` WHERE `uuid`='" . sql_escape($_REQUEST['uuid']) . "'",
246
+                            "SELECT `cache_id` FROM `caches` WHERE `uuid`='".sql_escape($_REQUEST['uuid'])."'",
247 247
                             0
248 248
                         );
249 249
                     } else {
@@ -302,23 +302,23 @@  discard block
 block discarded – undo
302 302
         $xmloutput = '';
303 303
         if ($bXmlDecl == '1') {
304 304
             if ($sCharset == 'iso-8859-1') {
305
-                $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>' . "\n";
305
+                $xmloutput .= '<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>'."\n";
306 306
             } else {
307 307
                 if ($sCharset == 'utf-8') {
308
-                    $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . "\n";
308
+                    $xmloutput .= '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'."\n";
309 309
                 }
310 310
             }
311 311
         }
312 312
         if ($bOcXmlTag == '1') {
313
-            $xmloutput .= '<ocxmlsession>' . "\n";
313
+            $xmloutput .= '<ocxmlsession>'."\n";
314 314
         }
315
-        $xmloutput .= '  <sessionid>' . $sessionid . '</sessionid>' . "\n";
316
-        $xmloutput .= '  <records user="' . $recordcount['users'] .
317
-            '" cache="' . $recordcount['caches'] .
318
-            '" cachedesc="' . $recordcount['cachedescs'] .
319
-            '" cachelog="' . $recordcount['cachelogs'] .
320
-            '" picture="' . $recordcount['pictures'] .
321
-            '" removeobject="' . $recordcount['removedobjects'] . '" />' . "\n";
315
+        $xmloutput .= '  <sessionid>'.$sessionid.'</sessionid>'."\n";
316
+        $xmloutput .= '  <records user="'.$recordcount['users'].
317
+            '" cache="'.$recordcount['caches'].
318
+            '" cachedesc="'.$recordcount['cachedescs'].
319
+            '" cachelog="'.$recordcount['cachelogs'].
320
+            '" picture="'.$recordcount['pictures'].
321
+            '" removeobject="'.$recordcount['removedobjects'].'" />'."\n";
322 322
         if ($bOcXmlTag == '1') {
323 323
             $xmloutput .= '</ocxmlsession>';
324 324
         }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
     $logtypes = [];
389 389
     $rs = sql('SELECT `id`, `de` FROM log_types');
390
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
390
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
391 391
         $r = sql_fetch_array($rs);
392 392
         $logtypes[$r['id']] = $r['de'];
393 393
     }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
     $cachetypes = [];
397 397
     $rs = sql('SELECT `id`, `short`, `de` FROM cache_type');
398
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
398
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
399 399
         $r = sql_fetch_array($rs);
400 400
         $cachetypes[$r['id']]['de'] = $r['de'];
401 401
         $cachetypes[$r['id']]['short'] = $r['short'];
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
     $cachestatus = [];
406 406
     $rs = sql('SELECT `id`, `de` FROM cache_status');
407
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
407
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
408 408
         $r = sql_fetch_array($rs);
409 409
         $cachestatus[$r['id']]['de'] = $r['de'];
410 410
     }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
     $counties = [];
414 414
     $rs = sql('SELECT `short`, `de` FROM countries');
415
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
415
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
416 416
         $r = sql_fetch_array($rs);
417 417
         $counties[$r['short']]['de'] = $r['de'];
418 418
     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
     $cachesizes = [];
422 422
     $rs = sql('SELECT `id`, `de` FROM cache_size');
423
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
423
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
424 424
         $r = sql_fetch_array($rs);
425 425
         $cachesizes[$r['id']]['de'] = $r['de'];
426 426
     }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
     $languages = [];
430 430
     $rs = sql('SELECT `short`, `de` FROM languages');
431
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
431
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
432 432
         $r = sql_fetch_array($rs);
433 433
         $languages[$r['short']]['de'] = $r['de'];
434 434
     }
@@ -439,32 +439,32 @@  discard block
 block discarded – undo
439 439
     $objecttypes['3'] = 'cachedesc';
440 440
     $objecttypes['1'] = 'cachelog';
441 441
     $objecttypes['6'] = 'picture';
442
-    $objecttypes['8'] = 'cachelist';    // not implemented yet
442
+    $objecttypes['8'] = 'cachelist'; // not implemented yet
443 443
 
444 444
     /* end now a few dynamically loaded constants */
445 445
 
446 446
     // temporäre Datei erstellen
447
-    if (!is_dir($zip_basedir . 'ocxml11/' . $sessionid)) {
448
-        mkdir($zip_basedir . 'ocxml11/' . $sessionid);
447
+    if (!is_dir($zip_basedir.'ocxml11/'.$sessionid)) {
448
+        mkdir($zip_basedir.'ocxml11/'.$sessionid);
449 449
     }
450 450
 
451 451
     $fileid = 1;
452 452
     while (file_exists(
453
-        $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'
453
+        $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml'
454 454
     )) {
455
-        $fileid ++;
455
+        $fileid++;
456 456
     }
457 457
 
458
-    $xmlfilename = $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml';
458
+    $xmlfilename = $zip_basedir.'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml';
459 459
 
460 460
     $f = fopen($xmlfilename, 'w');
461 461
 
462 462
     if ($bXmlDecl == '1') {
463 463
         if ($sCharset == 'iso-8859-1') {
464
-            fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>' . "\n");
464
+            fwrite($f, '<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>'."\n");
465 465
         } else {
466 466
             if ($sCharset == 'utf-8') {
467
-                fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>' . "\n");
467
+                fwrite($f, '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>'."\n");
468 468
             }
469 469
         }
470 470
     }
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     if ($bDocType == '1') {
473 473
         fwrite(
474 474
             $f,
475
-            '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.' . ($ocxmlversion % 10) . '//EN" "http://www.opencaching.de/xml/ocxml' . $ocxmlversion . '.dtd">' . "\n"
475
+            '<!DOCTYPE oc11xml PUBLIC "-//Opencaching Network//DTD OCXml V 1.'.($ocxmlversion % 10).'//EN" "http://www.opencaching.de/xml/ocxml'.$ocxmlversion.'.dtd">'."\n"
476 476
         );
477 477
     }
478 478
     if ($bOcXmlTag == '1') {
@@ -480,30 +480,30 @@  discard block
 block discarded – undo
480 480
         $r = sql_fetch_array($rs);
481 481
         fwrite(
482 482
             $f,
483
-            '<oc11xml version="1.' . ($ocxmlversion % 10) . '" date="' . date(
483
+            '<oc11xml version="1.'.($ocxmlversion % 10).'" date="'.date(
484 484
                 $sDateformat,
485 485
                 strtotime($r['date_created'])
486
-            ) . '" since="' . date($sDateformat, strtotime($r['modified_since'])) . '">' . "\n"
486
+            ).'" since="'.date($sDateformat, strtotime($r['modified_since'])).'">'."\n"
487 487
         );
488 488
         mysql_free_result($rs);
489 489
     }
490 490
 
491 491
     if ($bAttrlist == '1') {
492 492
         $rs = sql("SELECT SQL_BUFFER_RESULT `id`, `name`, `icon_large`, `icon_no`, `icon_undef` FROM `cache_attrib`");
493
-        fwrite($f, $t1 . '<attrlist>' . "\n");
493
+        fwrite($f, $t1.'<attrlist>'."\n");
494 494
         while ($r = sql_fetch_assoc($rs)) {
495 495
             fwrite(
496 496
                 $f,
497
-                $t2 . '<attr id="' . $r['id'] . '" icon_large="' . xmlentities(
498
-                    $opt['page']['default_absolute_url'] . $r['icon_large']
499
-                ) . '" icon_no="' . xmlentities(
500
-                    $opt['page']['default_absolute_url'] . $r['icon_no']
501
-                ) . '" icon_undef="' . xmlentities(
502
-                    $opt['page']['default_absolute_url'] . $r['icon_undef']
503
-                ) . '">' . xmlcdata($r['name']) . '</attr>' . "\n"
497
+                $t2.'<attr id="'.$r['id'].'" icon_large="'.xmlentities(
498
+                    $opt['page']['default_absolute_url'].$r['icon_large']
499
+                ).'" icon_no="'.xmlentities(
500
+                    $opt['page']['default_absolute_url'].$r['icon_no']
501
+                ).'" icon_undef="'.xmlentities(
502
+                    $opt['page']['default_absolute_url'].$r['icon_undef']
503
+                ).'">'.xmlcdata($r['name']).'</attr>'."\n"
504 504
             );
505 505
         }
506
-        fwrite($f, $t1 . '</attrlist>' . "\n");
506
+        fwrite($f, $t1.'</attrlist>'."\n");
507 507
         sql_free_result($rs);
508 508
     }
509 509
 
@@ -511,18 +511,18 @@  discard block
 block discarded – undo
511 511
         '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`'
512 512
     );
513 513
     while ($r = sql_fetch_array($rs)) {
514
-        fwrite($f, $t1 . '<user>' . "\n");
514
+        fwrite($f, $t1.'<user>'."\n");
515 515
 
516
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
517
-        fwrite($f, $t2 . '<username>' . xmlcdata($r['username']) . '</username>' . "\n");
518
-        fwrite($f, $t2 . '<pmr>' . (($r['pmr_flag'] == 0) ? '0' : '1') . '</pmr>' . "\n");
519
-        fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
516
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
517
+        fwrite($f, $t2.'<username>'.xmlcdata($r['username']).'</username>'."\n");
518
+        fwrite($f, $t2.'<pmr>'.(($r['pmr_flag'] == 0) ? '0' : '1').'</pmr>'."\n");
519
+        fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n");
520 520
         fwrite(
521 521
             $f,
522
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
522
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
523 523
         );
524 524
 
525
-        fwrite($f, $t1 . '</user>' . "\n");
525
+        fwrite($f, $t1.'</user>'."\n");
526 526
     }
527 527
     mysql_free_result($rs);
528 528
 
@@ -551,8 +551,8 @@  discard block
 block discarded – undo
551 551
         }   // return as micro in old interface version
552 552
 
553 553
         if ($ocxmlversion >= 15) {
554
-            $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"';
555
-            $gccom2 = ' gccom2="' . xmlentities($r['wp_gc_maintained']) . '"';
554
+            $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"';
555
+            $gccom2 = ' gccom2="'.xmlentities($r['wp_gc_maintained']).'"';
556 556
             $nccom = '';
557 557
         } else {
558 558
             $statusflags = '';
@@ -560,74 +560,74 @@  discard block
 block discarded – undo
560 560
             $nccom = ' nccom=""';
561 561
         }
562 562
 
563
-        fwrite($f, $t1 . '<cache>' . "\n");
563
+        fwrite($f, $t1.'<cache>'."\n");
564 564
 
565
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
565
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
566 566
         fwrite(
567 567
             $f,
568
-            $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata(
568
+            $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata(
569 569
                 $r['username']
570
-            ) . '</userid>' . "\n"
570
+            ).'</userid>'."\n"
571 571
         );
572
-        fwrite($f, $t2 . '<name>' . xmlcdata(($bAllowView ? $r['name'] : '')) . '</name>' . "\n");
572
+        fwrite($f, $t2.'<name>'.xmlcdata(($bAllowView ? $r['name'] : '')).'</name>'."\n");
573 573
         fwrite(
574 574
             $f,
575
-            $t2 . '<longitude>' . sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)) . '</longitude>' . "\n"
575
+            $t2.'<longitude>'.sprintf('%01.5f', ($bAllowView ? $r['longitude'] : 0)).'</longitude>'."\n"
576 576
         );
577
-        fwrite($f, $t2 . '<latitude>' . sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)) . '</latitude>' . "\n");
577
+        fwrite($f, $t2.'<latitude>'.sprintf('%01.5f', ($bAllowView ? $r['latitude'] : 0)).'</latitude>'."\n");
578 578
         fwrite(
579 579
             $f,
580
-            $t2 . '<type id="' . $r['type'] . '" short="' . xmlentities(
580
+            $t2.'<type id="'.$r['type'].'" short="'.xmlentities(
581 581
                 $cachetypes[$r['type']]['short']
582
-            ) . '">' . xmlcdata($cachetypes[$r['type']]['de']) . '</type>' . "\n"
582
+            ).'">'.xmlcdata($cachetypes[$r['type']]['de']).'</type>'."\n"
583 583
         );
584 584
         fwrite(
585 585
             $f,
586
-            $t2 . '<status id="' . $r['status'] . '"' . $statusflags . '>' . xmlcdata(
586
+            $t2.'<status id="'.$r['status'].'"'.$statusflags.'>'.xmlcdata(
587 587
                 $cachestatus[$r['status']]['de']
588
-            ) . '</status>' . "\n"
588
+            ).'</status>'."\n"
589 589
         );
590 590
         fwrite(
591 591
             $f,
592
-            $t2 . '<country id="' . $r['country'] . '">' . xmlcdata(
592
+            $t2.'<country id="'.$r['country'].'">'.xmlcdata(
593 593
                 $counties[$r['country']]['de']
594
-            ) . '</country>' . "\n"
594
+            ).'</country>'."\n"
595 595
         );
596
-        fwrite($f, $t2 . '<size id="' . $r['size'] . '">' . xmlcdata($cachesizes[$r['size']]['de']) . '</size>' . "\n");
597
-        fwrite($f, $t2 . '<desclanguages>' . $r['desclanguages'] . '</desclanguages>' . "\n");
598
-        fwrite($f, $t2 . '<difficulty>' . sprintf('%01.1f', $r['difficulty'] / 2) . '</difficulty>' . "\n");
599
-        fwrite($f, $t2 . '<terrain>' . sprintf('%01.1f', $r['terrain'] / 2) . '</terrain>' . "\n");
600
-        fwrite($f, $t2 . '<rating waylength="' . $r['way_length'] . '" needtime="' . $r['search_time'] . '" />' . "\n");
596
+        fwrite($f, $t2.'<size id="'.$r['size'].'">'.xmlcdata($cachesizes[$r['size']]['de']).'</size>'."\n");
597
+        fwrite($f, $t2.'<desclanguages>'.$r['desclanguages'].'</desclanguages>'."\n");
598
+        fwrite($f, $t2.'<difficulty>'.sprintf('%01.1f', $r['difficulty'] / 2).'</difficulty>'."\n");
599
+        fwrite($f, $t2.'<terrain>'.sprintf('%01.1f', $r['terrain'] / 2).'</terrain>'."\n");
600
+        fwrite($f, $t2.'<rating waylength="'.$r['way_length'].'" needtime="'.$r['search_time'].'" />'."\n");
601 601
         fwrite(
602 602
             $f,
603
-            $t2 . '<waypoints oc="' . xmlentities($r['wp_oc']) . '" gccom="' . xmlentities(
603
+            $t2.'<waypoints oc="'.xmlentities($r['wp_oc']).'" gccom="'.xmlentities(
604 604
                 $r['wp_gc']
605
-            ) . '"' . $gccom2 . $nccom . ' />' . "\n"
605
+            ).'"'.$gccom2.$nccom.' />'."\n"
606 606
         );
607
-        fwrite($f, $t2 . '<datehidden>' . date($sDateformat, strtotime($r['date_hidden'])) . '</datehidden>' . "\n");
607
+        fwrite($f, $t2.'<datehidden>'.date($sDateformat, strtotime($r['date_hidden'])).'</datehidden>'."\n");
608 608
         if ($ocxmlversion >= 12) {
609
-            $pd = ' ispublishdate="' . $r['is_publishdate'] . '"';
609
+            $pd = ' ispublishdate="'.$r['is_publishdate'].'"';
610 610
         } else {
611 611
             $pd = "";
612 612
         }
613 613
         fwrite(
614 614
             $f,
615
-            $t2 . '<datecreated' . $pd . '>' . date(
615
+            $t2.'<datecreated'.$pd.'>'.date(
616 616
                 $sDateformat,
617 617
                 strtotime($r['date_created'])
618
-            ) . '</datecreated>' . "\n"
618
+            ).'</datecreated>'."\n"
619 619
         );
620 620
         fwrite(
621 621
             $f,
622
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
622
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
623 623
         );
624 624
         if ($ocxmlversion >= 14) {
625 625
             fwrite(
626 626
                 $f,
627
-                $t2 . '<listing_lastmodified>' . date(
627
+                $t2.'<listing_lastmodified>'.date(
628 628
                     $sDateformat,
629 629
                     strtotime($r['listing_last_modified'])
630
-                ) . '</listing_lastmodified>' . "\n"
630
+                ).'</listing_lastmodified>'."\n"
631 631
             );
632 632
         }
633 633
 
@@ -638,16 +638,16 @@  discard block
 block discarded – undo
638 638
                               WHERE `caches_attributes`.`cache_id`='&1'",
639 639
             $r['id']
640 640
         );
641
-        fwrite($f, $t2 . '<attributes>' . "\n");
641
+        fwrite($f, $t2.'<attributes>'."\n");
642 642
         while ($rAttribute = sql_fetch_assoc($rsAttributes)) {
643 643
             fwrite(
644 644
                 $f,
645
-                $t3 . '<attribute id="' . ($rAttribute['id'] + 0) . '">' . xmlcdata(
645
+                $t3.'<attribute id="'.($rAttribute['id'] + 0).'">'.xmlcdata(
646 646
                     $rAttribute['name']
647
-                ) . '</attribute>' . "\n"
647
+                ).'</attribute>'."\n"
648 648
             );
649 649
         }
650
-        fwrite($f, $t2 . '</attributes>' . "\n");
650
+        fwrite($f, $t2.'</attributes>'."\n");
651 651
         sql_free_result($rsAttributes);
652 652
 
653 653
         if ($ocxmlversion >= 13) {
@@ -662,23 +662,23 @@  discard block
 block discarded – undo
662 662
                               ORDER BY `coordinates`.`id` ASC",
663 663
                 $r['id']
664 664
             );
665
-            fwrite($f, $t2 . '<wpts>' . "\n");
665
+            fwrite($f, $t2.'<wpts>'."\n");
666 666
             while ($rWaypoint = sql_fetch_assoc($rsWaypoints)) {
667 667
                 fwrite(
668 668
                     $f,
669
-                    $t3 . '<wpt id="' . ($rWaypoint['id'] + 0) . '" type="' . ($rWaypoint['type'] + 0) . '" typename="' . xmlentities(
669
+                    $t3.'<wpt id="'.($rWaypoint['id'] + 0).'" type="'.($rWaypoint['type'] + 0).'" typename="'.xmlentities(
670 670
                         $rWaypoint['type_name']
671
-                    ) . '" longitude="' . sprintf('%01.5f', $rWaypoint['longitude']) . '" latitude="' . sprintf(
671
+                    ).'" longitude="'.sprintf('%01.5f', $rWaypoint['longitude']).'" latitude="'.sprintf(
672 672
                         '%01.5f',
673 673
                         $rWaypoint['latitude']
674
-                    ) . '">' . xmlcdata($rWaypoint['description']) . '</wpt>' . "\n"
674
+                    ).'">'.xmlcdata($rWaypoint['description']).'</wpt>'."\n"
675 675
                 );
676 676
             }
677
-            fwrite($f, $t2 . '</wpts>' . "\n");
677
+            fwrite($f, $t2.'</wpts>'."\n");
678 678
             sql_free_result($rsWaypoints);
679 679
         }
680 680
 
681
-        fwrite($f, $t1 . '</cache>' . "\n");
681
+        fwrite($f, $t1.'</cache>'."\n");
682 682
     }
683 683
     mysql_free_result($rs);
684 684
 
@@ -698,18 +698,18 @@  discard block
 block discarded – undo
698 698
     while ($r = sql_fetch_array($rs)) {
699 699
         $bAllowView = ($r['allow_user_view'] == 1);
700 700
 
701
-        fwrite($f, $t1 . '<cachedesc>' . "\n");
701
+        fwrite($f, $t1.'<cachedesc>'."\n");
702 702
 
703
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
704
-        fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n");
703
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
704
+        fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n");
705 705
 
706 706
         fwrite(
707 707
             $f,
708
-            $t2 . '<language id="' . $r['language'] . '">' . xmlcdata(
708
+            $t2.'<language id="'.$r['language'].'">'.xmlcdata(
709 709
                 $languages[$r['language']]['de']
710
-            ) . '</language>' . "\n"
710
+            ).'</language>'."\n"
711 711
         );
712
-        fwrite($f, $t2 . '<shortdesc>' . xmlcdata(($bAllowView ? $r['short_desc'] : '')) . '</shortdesc>' . "\n");
712
+        fwrite($f, $t2.'<shortdesc>'.xmlcdata(($bAllowView ? $r['short_desc'] : '')).'</shortdesc>'."\n");
713 713
 
714 714
         $desc = $r['desc'];
715 715
         if ($r['desc_html'] == 0) {
@@ -728,10 +728,10 @@  discard block
 block discarded – undo
728 728
             true
729 729
         );
730 730
         if ($bLicense) {
731
-            fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n");
731
+            fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n");
732 732
         } else {
733 733
             if ($disclaimer != "") {
734
-                $desc .= "<p><em>" . $disclaimer . "</em></p>";
734
+                $desc .= "<p><em>".$disclaimer."</em></p>";
735 735
             }
736 736
         }
737 737
 
@@ -739,21 +739,21 @@  discard block
 block discarded – undo
739 739
 
740 740
         fwrite(
741 741
             $f,
742
-            $t2 . '<desc html="' . (($r['desc_html'] == 1) ? '1' : '0') . '">' . xmlcdata(
742
+            $t2.'<desc html="'.(($r['desc_html'] == 1) ? '1' : '0').'">'.xmlcdata(
743 743
                 ($bAllowView ? $desc : '')
744
-            ) . '</desc>' . "\n"
744
+            ).'</desc>'."\n"
745 745
         );
746 746
 
747 747
         $r['hint'] = mb_ereg_replace('<br />', '', $r['hint']);
748 748
         $r['hint'] = html_entity_decode($r['hint'], ENT_COMPAT, 'UTF-8');
749 749
 
750
-        fwrite($f, $t2 . '<hint>' . xmlcdata(($bAllowView ? $r['hint'] : '')) . '</hint>' . "\n");
750
+        fwrite($f, $t2.'<hint>'.xmlcdata(($bAllowView ? $r['hint'] : '')).'</hint>'."\n");
751 751
         fwrite(
752 752
             $f,
753
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
753
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
754 754
         );
755 755
 
756
-        fwrite($f, $t1 . '</cachedesc>' . "\n");
756
+        fwrite($f, $t1.'</cachedesc>'."\n");
757 757
     }
758 758
     mysql_free_result($rs);
759 759
 
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
         }
795 795
 
796 796
         if ($ocxmlversion >= 13) {
797
-            $teamcomment = ' teamcomment="' . $r['oc_team_comment'] . '"';
797
+            $teamcomment = ' teamcomment="'.$r['oc_team_comment'].'"';
798 798
         } else {
799 799
             $teamcomment = '';
800 800
             if ($r['type'] > 8) {
@@ -803,51 +803,51 @@  discard block
 block discarded – undo
803 803
         }
804 804
 
805 805
         if ($ocxmlversion >= 15) {
806
-            $statusflags = ' needs_maintenance="' . $r['needs_maintenance'] . '" listing_outdated="' . $r['listing_outdated'] . '"';
806
+            $statusflags = ' needs_maintenance="'.$r['needs_maintenance'].'" listing_outdated="'.$r['listing_outdated'].'"';
807 807
         } else {
808 808
             $statusflags = '';
809 809
         }
810 810
 
811
-        fwrite($f, $t1 . '<cachelog>' . "\n");
812
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
813
-        fwrite($f, $t2 . '<cacheid id="' . $r['cache_id'] . '">' . $r['cacheuuid'] . '</cacheid>' . "\n");
811
+        fwrite($f, $t1.'<cachelog>'."\n");
812
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
813
+        fwrite($f, $t2.'<cacheid id="'.$r['cache_id'].'">'.$r['cacheuuid'].'</cacheid>'."\n");
814 814
         fwrite(
815 815
             $f,
816
-            $t2 . '<userid id="' . $r['user_id'] . '" uuid="' . $r['useruuid'] . '">' . xmlcdata(
816
+            $t2.'<userid id="'.$r['user_id'].'" uuid="'.$r['useruuid'].'">'.xmlcdata(
817 817
                 $r['username']
818
-            ) . '</userid>' . "\n"
818
+            ).'</userid>'."\n"
819 819
         );
820 820
         fwrite(
821 821
             $f,
822
-            $t2 . '<logtype id="' . $r['type'] . '" recommended="' . $r['recommended'] . '"' . $teamcomment . $statusflags . '>' . xmlcdata(
822
+            $t2.'<logtype id="'.$r['type'].'" recommended="'.$r['recommended'].'"'.$teamcomment.$statusflags.'>'.xmlcdata(
823 823
                 $logtypes[$r['type']]
824
-            ) . '</logtype>' . "\n"
824
+            ).'</logtype>'."\n"
825 825
         );
826 826
         fwrite(
827 827
             $f,
828
-            $t2 . '<date>' . date(
828
+            $t2.'<date>'.date(
829 829
                 $ocxmlversion >= 13 ? $sDateformat : $sDateshort,
830 830
                 strtotime($r['date'])
831
-            ) . '</date>' . "\n"
831
+            ).'</date>'."\n"
832 832
         );
833 833
         fwrite(
834 834
             $f,
835
-            $t2 . '<text html="' . $r['text_html'] . '">' . xmlcdata(
835
+            $t2.'<text html="'.$r['text_html'].'">'.xmlcdata(
836 836
                 ($bAllowView ? $r['text'] : '')
837
-            ) . '</text>' . "\n"
837
+            ).'</text>'."\n"
838 838
         );
839
-        fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
839
+        fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n");
840 840
         fwrite(
841 841
             $f,
842
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
842
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
843 843
         );
844 844
         if ($ocxmlversion >= 14) {
845 845
             fwrite(
846 846
                 $f,
847
-                $t2 . '<log_lastmodified>' . date(
847
+                $t2.'<log_lastmodified>'.date(
848 848
                     $sDateformat,
849 849
                     strtotime($r['log_last_modified'])
850
-                ) . '</log_lastmodified>' . "\n"
850
+                ).'</log_lastmodified>'."\n"
851 851
             );
852 852
         }
853 853
 
@@ -862,10 +862,10 @@  discard block
 block discarded – undo
862 862
                 false,
863 863
                 true
864 864
             );
865
-            fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n");
865
+            fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n");
866 866
         }
867 867
 
868
-        fwrite($f, $t1 . '</cachelog>' . "\n");
868
+        fwrite($f, $t1.'</cachelog>'."\n");
869 869
     }
870 870
     mysql_free_result($rs);
871 871
 
@@ -895,30 +895,30 @@  discard block
 block discarded – undo
895 895
     while ($r = sql_fetch_array($rs)) {
896 896
         $bAllowView = ($r['auv'] == 1);
897 897
 
898
-        fwrite($f, $t1 . '<picture>' . "\n");
899
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '">' . $r['uuid'] . '</id>' . "\n");
900
-        fwrite($f, $t2 . '<url>' . xmlcdata(($bAllowView ? $r['url'] : '')) . '</url>' . "\n");
901
-        fwrite($f, $t2 . '<title>' . xmlcdata(($bAllowView ? $r['title'] : '')) . '</title>' . "\n");
898
+        fwrite($f, $t1.'<picture>'."\n");
899
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'">'.$r['uuid'].'</id>'."\n");
900
+        fwrite($f, $t2.'<url>'.xmlcdata(($bAllowView ? $r['url'] : '')).'</url>'."\n");
901
+        fwrite($f, $t2.'<title>'.xmlcdata(($bAllowView ? $r['title'] : '')).'</title>'."\n");
902 902
         fwrite(
903 903
             $f,
904
-            $t2 . '<object id="' . $r['object_id'] . '" type="' . $r['object_type'] . '" typename="' . xmlentities(
904
+            $t2.'<object id="'.$r['object_id'].'" type="'.$r['object_type'].'" typename="'.xmlentities(
905 905
                 $objecttypes[$r['object_type']]
906
-            ) . '">' . object_id2uuid($r['object_id'], $r['object_type']) . '</object>' . "\n"
906
+            ).'">'.object_id2uuid($r['object_id'], $r['object_type']).'</object>'."\n"
907 907
         );
908 908
         if ($ocxmlversion >= 13) {
909 909
             fwrite(
910 910
                 $f,
911
-                $t2 . '<picattr spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" preview="' . $r['mappreview'] . '" />' . "\n"
911
+                $t2.'<picattr spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" preview="'.$r['mappreview'].'" />'."\n"
912 912
             );
913 913
         } else {
914
-            fwrite($f, $t2 . '<attributes spoiler="' . $r['spoiler'] . '" display="' . $r['display'] . '" />' . "\n");
914
+            fwrite($f, $t2.'<attributes spoiler="'.$r['spoiler'].'" display="'.$r['display'].'" />'."\n");
915 915
         }
916
-        fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
916
+        fwrite($f, $t2.'<datecreated>'.date($sDateformat, strtotime($r['date_created'])).'</datecreated>'."\n");
917 917
         fwrite(
918 918
             $f,
919
-            $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\n"
919
+            $t2.'<lastmodified>'.date($sDateformat, strtotime($r['last_modified'])).'</lastmodified>'."\n"
920 920
         );
921
-        fwrite($f, $t2 . '<position>' . $r['seq'] . '</position>' . "\n");
921
+        fwrite($f, $t2.'<position>'.$r['seq'].'</position>'."\n");
922 922
 
923 923
         if ($bLicense) {
924 924
             $lang = ($sLanguage != "" ? $sLanguage : $r['language']);
@@ -931,10 +931,10 @@  discard block
 block discarded – undo
931 931
                 false,
932 932
                 true
933 933
             );
934
-            fwrite($f, $t2 . '<license>' . xmlcdata($disclaimer) . '</license>' . "\n");
934
+            fwrite($f, $t2.'<license>'.xmlcdata($disclaimer).'</license>'."\n");
935 935
         }
936 936
 
937
-        fwrite($f, $t1 . '</picture>' . "\n");
937
+        fwrite($f, $t1.'</picture>'."\n");
938 938
     }
939 939
     mysql_free_result($rs);
940 940
 
@@ -944,31 +944,31 @@  discard block
 block discarded – undo
944 944
                                    FROM `tmpxml_removedobjects`, `removed_objects` WHERE `removed_objects`.`id`=`tmpxml_removedobjects`.`id`'
945 945
     );
946 946
     while ($r = sql_fetch_array($rs)) {
947
-        fwrite($f, $t1 . '<removedobject>' . "\n");
948
-        fwrite($f, $t2 . '<id id="' . $r['id'] . '" node="' . $r['node'] . '" />' . "\n");
947
+        fwrite($f, $t1.'<removedobject>'."\n");
948
+        fwrite($f, $t2.'<id id="'.$r['id'].'" node="'.$r['node'].'" />'."\n");
949 949
         fwrite(
950 950
             $f,
951
-            $t2 . '<object id="' . $r['localid'] . '" type="' . $r['type'] . '" typename="' . xmlentities(
951
+            $t2.'<object id="'.$r['localid'].'" type="'.$r['type'].'" typename="'.xmlentities(
952 952
                 $objecttypes[$r['type']]
953
-            ) . '">' . $r['uuid'] . '</object>' . "\n"
953
+            ).'">'.$r['uuid'].'</object>'."\n"
954 954
         );
955
-        fwrite($f, $t2 . '<removeddate>' . date($sDateformat, strtotime($r['removed_date'])) . '</removeddate>' . "\n");
956
-        fwrite($f, $t1 . '</removedobject>' . "\n");
955
+        fwrite($f, $t2.'<removeddate>'.date($sDateformat, strtotime($r['removed_date'])).'</removeddate>'."\n");
956
+        fwrite($f, $t1.'</removedobject>'."\n");
957 957
     }
958 958
     mysql_free_result($rs);
959 959
 
960 960
     if ($bOcXmlTag == '1') {
961
-        fwrite($f, '</oc11xml>' . "\n");
961
+        fwrite($f, '</oc11xml>'."\n");
962 962
     }
963 963
 
964 964
     fclose($f);
965 965
 
966
-    $rel_xmlfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml';
967
-    $rel_zipfile = 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid;
966
+    $rel_xmlfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid.'.xml';
967
+    $rel_zipfile = 'ocxml11/'.$sessionid.'/'.$sessionid.'-'.$filenr.'-'.$fileid;
968 968
 
969 969
     // zippen und url-redirect
970 970
     if ($ziptype == '0') {
971
-        tpl_redirect($zip_wwwdir . $rel_xmlfile);
971
+        tpl_redirect($zip_wwwdir.$rel_xmlfile);
972 972
         exit;
973 973
     } else {
974 974
         if ($ziptype == 'zip') {
@@ -986,17 +986,17 @@  discard block
 block discarded – undo
986 986
         }
987 987
     }
988 988
 
989
-    $call = $safemode_zip . ' --type=' . escapeshellcmd($ziptype) . ' --src=' . escapeshellcmd(
989
+    $call = $safemode_zip.' --type='.escapeshellcmd($ziptype).' --src='.escapeshellcmd(
990 990
             $rel_xmlfile
991
-        ) . ' --dst=' . escapeshellcmd($rel_zipfile);
991
+        ).' --dst='.escapeshellcmd($rel_zipfile);
992 992
     system($call);
993 993
 
994 994
     // datei vorhanden?
995
-    if (!file_exists($zip_basedir . $rel_zipfile)) {
995
+    if (!file_exists($zip_basedir.$rel_zipfile)) {
996 996
         die('all ok, but zip failed - internal server error');
997 997
     }
998 998
 
999
-    tpl_redirect($zip_wwwdir . $rel_zipfile);
999
+    tpl_redirect($zip_wwwdir.$rel_zipfile);
1000 1000
 
1001 1001
     exit;
1002 1002
 }
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
             }
1049 1049
             sql(
1050 1050
                 "INSERT INTO xmlsession_data (`session_id`, `object_type`, `object_id`)
1051
-                 SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield . " >= '&2' AND `status`!=5",
1051
+                 SELECT &1, 2, `cache_id` FROM `caches` WHERE " . $wherefield." >= '&2' AND `status`!=5",
1052 1052
                 $sessionid,
1053 1053
                 $sModifiedSince
1054 1054
             );
@@ -1137,31 +1137,31 @@  discard block
 block discarded – undo
1137 1137
                         'longitude',
1138 1138
                         'latitude',
1139 1139
                         'cache_coordinates'
1140
-                    ) . ' `distance` ';
1140
+                    ).' `distance` ';
1141 1141
                 $sql .= 'FROM `caches`, `cache_coordinates` WHERE ';
1142 1142
                 $sql .= '`cache_coordinates`.`cache_id`=`caches`.`cache_id`';
1143 1143
                 $sql .= ' AND `caches`.`status`!=5';
1144
-                $sql .= ' AND `cache_coordinates`.`latitude` > ' . geomath::getMinLat(
1144
+                $sql .= ' AND `cache_coordinates`.`latitude` > '.geomath::getMinLat(
1145 1145
                         $selection['lon'],
1146 1146
                         $selection['lat'],
1147 1147
                         $selection['distance']
1148 1148
                     );
1149
-                $sql .= ' AND `cache_coordinates`.`latitude` < ' . geomath::getMaxLat(
1149
+                $sql .= ' AND `cache_coordinates`.`latitude` < '.geomath::getMaxLat(
1150 1150
                         $selection['lon'],
1151 1151
                         $selection['lat'],
1152 1152
                         $selection['distance']
1153 1153
                     );
1154
-                $sql .= ' AND `cache_coordinates`.`longitude` >' . geomath::getMinLon(
1154
+                $sql .= ' AND `cache_coordinates`.`longitude` >'.geomath::getMinLon(
1155 1155
                         $selection['lon'],
1156 1156
                         $selection['lat'],
1157 1157
                         $selection['distance']
1158 1158
                     );
1159
-                $sql .= ' AND `cache_coordinates`.`longitude` < ' . geomath::getMaxLon(
1159
+                $sql .= ' AND `cache_coordinates`.`longitude` < '.geomath::getMaxLon(
1160 1160
                         $selection['lon'],
1161 1161
                         $selection['lat'],
1162 1162
                         $selection['distance']
1163 1163
                     );
1164
-                $sql .= ' HAVING `distance` < ' . ($selection['distance'] + 0);
1164
+                $sql .= ' HAVING `distance` < '.($selection['distance'] + 0);
1165 1165
 
1166 1166
                 sql($sql);
1167 1167
             } else {
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
 //    echo $startat . ' ' . $endat . '<br><br>';
1301 1301
 //    echo '<table>';
1302 1302
 //    echo '<tr><td>sql-start</td><td>sql-count</td><td>count</td><td>begin</td><td>end</td></tr>';
1303
-    for ($i = 0; $i < 6; $i ++) {
1303
+    for ($i = 0; $i < 6; $i++) {
1304 1304
         if (($startat >= $recordnr[$i]) && ($startat + 500 < $recordnr[$i + 1])) {
1305 1305
             if ($recordnr[$i + 1] - $startat > 500) {
1306 1306
                 $limits[$i] = ['start' => $startat - $recordnr[$i], 'count' => 500];
@@ -1403,7 +1403,7 @@  discard block
 block discarded – undo
1403 1403
         $str = output_convert($str);
1404 1404
         $str = mb_ereg_replace(']]>', ']] >', $str);
1405 1405
 
1406
-        return '<![CDATA[' . filterevilchars($str) . ']]>';
1406
+        return '<![CDATA['.filterevilchars($str).']]>';
1407 1407
     } else {
1408 1408
         return xmlentities($str);
1409 1409
     }
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
     $from[4] = '\'';
1423 1423
     $to[4] = '&apos;';
1424 1424
 
1425
-    for ($i = 0; $i <= 4; $i ++) {
1425
+    for ($i = 0; $i <= 4; $i++) {
1426 1426
         $str = mb_ereg_replace($from[$i], $to[$i], $str);
1427 1427
     }
1428 1428
 
@@ -1501,13 +1501,13 @@  discard block
 block discarded – undo
1501 1501
 
1502 1502
     $hDir = opendir($path);
1503 1503
     if ($hDir === false) {
1504
-        ++ $notunlinked;
1504
+        ++$notunlinked;
1505 1505
     } else {
1506 1506
         while (false !== ($file = readdir($hDir))) {
1507 1507
             if (($file != '.') && ($file != '..')) {
1508
-                if (is_dir($path . $file)) {
1509
-                    if (unlinkrecursiv($path . $file . '/') == false) {
1510
-                        $notunlinked ++;
1508
+                if (is_dir($path.$file)) {
1509
+                    if (unlinkrecursiv($path.$file.'/') == false) {
1510
+                        $notunlinked++;
1511 1511
                     }
1512 1512
                 } else {
1513 1513
                     if ((mb_substr($file, - 4) == '.zip') ||
@@ -1515,9 +1515,9 @@  discard block
 block discarded – undo
1515 1515
                         (mb_substr($file, - 4) == '.bz2') ||
1516 1516
                         (mb_substr($file, - 4) == '.xml')
1517 1517
                     ) {
1518
-                        @unlink($path . $file);
1518
+                        @unlink($path.$file);
1519 1519
                     } else {
1520
-                        $notunlinked ++;
1520
+                        $notunlinked++;
1521 1521
                     }
1522 1522
                 }
1523 1523
             }
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.
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
     }
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
         !isset($r['LANGUAGE']['__ATTR']['ID']) ||
809 809
         !isset($r['LASTMODIFIED']['__DATA'])
810 810
     ) {
811
-        echo 'error: ImportCacheDescArray required element not defined' . "\n";
811
+        echo 'error: ImportCacheDescArray required element not defined'."\n";
812 812
 
813 813
         return;
814 814
     }
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
         !isset($r['DATECREATED']['__DATA']) ||
966 966
         !isset($r['LASTMODIFIED']['__DATA'])
967 967
     ) {
968
-        echo 'error: ImportCachelogArray required element not defined' . "\n";
968
+        echo 'error: ImportCachelogArray required element not defined'."\n";
969 969
 
970 970
         return;
971 971
     }
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
 
997 997
     // logtype gültig?
998 998
     if (sqlValue(
999
-            "SELECT COUNT(*) FROM `log_types` WHERE `id`='" . sql_escape($r['LOGTYPE']['__ATTR']['ID']) . "'",
999
+            "SELECT COUNT(*) FROM `log_types` WHERE `id`='".sql_escape($r['LOGTYPE']['__ATTR']['ID'])."'",
1000 1000
             0
1001 1001
         ) == 0
1002 1002
     ) {
@@ -1070,7 +1070,7 @@  discard block
 block discarded – undo
1070 1070
         !isset($r['DATECREATED']['__DATA']) ||
1071 1071
         !isset($r['LASTMODIFIED']['__DATA'])
1072 1072
     ) {
1073
-        echo 'error: ImportPictureArray required element not defined ' . "\n";
1073
+        echo 'error: ImportPictureArray required element not defined '."\n";
1074 1074
 
1075 1075
         return;
1076 1076
     }
@@ -1171,7 +1171,7 @@  discard block
 block discarded – undo
1171 1171
         !isset($r['OBJECT']['__DATA']) ||
1172 1172
         !isset($r['REMOVEDDATE']['__DATA'])
1173 1173
     ) {
1174
-        echo 'error: ImportRemovedObjectArray required element not defined' . "\n";
1174
+        echo 'error: ImportRemovedObjectArray required element not defined'."\n";
1175 1175
 
1176 1176
         return;
1177 1177
     }
@@ -1283,12 +1283,12 @@  discard block
 block discarded – undo
1283 1283
 
1284 1284
 function importError($recordtype, $uuid, $r, $info)
1285 1285
 {
1286
-    echo 'error: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
1286
+    echo 'error: '.$recordtype.' ('.$uuid.'): '.$info."\n";
1287 1287
 }
1288 1288
 
1289 1289
 function importWarn($recordtype, $uuid, $r, $info)
1290 1290
 {
1291
-    echo 'warn: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
1291
+    echo 'warn: '.$recordtype.' ('.$uuid.'): '.$info."\n";
1292 1292
 }
1293 1293
 
1294 1294
 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/editdesc.php 2 patches
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,9 +19,12 @@  discard block
 block discarded – undo
19 19
     require $stylepath . '/editdesc.inc.php';
20 20
 
21 21
     // check for old-style parameters
22
-    if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid']))  // Ocprop
22
+    if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) {
23
+        // Ocprop
23 24
     {
24
-        $cache_id = $_REQUEST['cacheid'];  // Ocprop
25
+        $cache_id = $_REQUEST['cacheid'];
26
+    }
27
+    // Ocprop
25 28
         $desc_lang = $_REQUEST['desclang'];  // Ocprop
26 29
 
27 30
         $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang);
@@ -87,10 +90,13 @@  discard block
 block discarded – undo
87 90
                 $show_all_langs = false;
88 91
 
89 92
                 //save to DB?
90
-                if (isset($_POST['post']))  // Ocprop
93
+                if (isset($_POST['post'])) {
94
+                    // Ocprop
91 95
                 {
92 96
                     //here we read all used information from the form if submitted
93
-                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;  // Ocprop
97
+                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;
98
+                }
99
+                // Ocprop
94 100
 
95 101
                     // fuer alte Versionen von OCProp
96 102
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -147,7 +153,8 @@  discard block
 block discarded – undo
147 153
 
148 154
                     $desc = processEditorInput($oldDescMode, $descMode, $desc);
149 155
 
150
-                    if (isset($_POST['submitform']))  // Ocprop
156
+                    if (isset($_POST['submitform'])) {
157
+                        // Ocprop
151 158
                     {
152 159
                         // prüfen, ob sprache nicht schon vorhanden
153 160
                         $rs = sql(
@@ -160,6 +167,7 @@  discard block
 block discarded – undo
160 167
                             $descid,
161 168
                             $desclang
162 169
                         );
170
+                    }
163 171
                         $r = sql_fetch_array($rs);
164 172
                         if ($r['count'] > 0) {
165 173
                             tpl_errorMsg('editdesc', $error_desc_exists);
@@ -224,8 +232,7 @@  discard block
 block discarded – undo
224 232
 
225 233
                     if ($oldDescMode == 0) {
226 234
                         $desc = processEditorInput($oldDescMode, $descMode, $desc_record['desc']);
227
-                    }
228
-                    else {
235
+                    } else {
229 236
                         $desc = $desc_record['desc'];
230 237
                     }
231 238
                 }
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,20 +9,20 @@  discard block
 block discarded – undo
9 9
  *  Unicode Reminder メモ
10 10
  *****************************************************************************/
11 11
 
12
-require_once __DIR__ . '/lib/consts.inc.php';
12
+require_once __DIR__.'/lib/consts.inc.php';
13 13
 $opt['gui'] = GUI_HTML;
14
-require_once __DIR__ . '/lib/common.inc.php';
15
-require_once __DIR__ . '/lib2/edithelper.inc.php';
14
+require_once __DIR__.'/lib/common.inc.php';
15
+require_once __DIR__.'/lib2/edithelper.inc.php';
16 16
 
17 17
 // Preprocessing
18 18
 if ($error == false) {
19
-    require $stylepath . '/editdesc.inc.php';
19
+    require $stylepath.'/editdesc.inc.php';
20 20
 
21 21
     // check for old-style parameters
22 22
     if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid']))  // Ocprop
23 23
     {
24
-        $cache_id = $_REQUEST['cacheid'];  // Ocprop
25
-        $desc_lang = $_REQUEST['desclang'];  // Ocprop
24
+        $cache_id = $_REQUEST['cacheid']; // Ocprop
25
+        $desc_lang = $_REQUEST['desclang']; // Ocprop
26 26
 
27 27
         $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang);
28 28
         if (mysql_num_rows($rs) == 1) {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $tplname = 'login';
44 44
 
45 45
         tpl_set_var('username', '');
46
-        tpl_set_var('target', htmlspecialchars('editdesc.php?descid=' . urlencode($descid), ENT_COMPAT, 'UTF-8'));
46
+        tpl_set_var('target', htmlspecialchars('editdesc.php?descid='.urlencode($descid), ENT_COMPAT, 'UTF-8'));
47 47
         tpl_set_var('message_start', "");
48 48
         tpl_set_var('message_end', "");
49 49
         tpl_set_var('message', $login_required);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 if (isset($_POST['post']))  // Ocprop
91 91
                 {
92 92
                     //here we read all used information from the form if submitted
93
-                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;  // Ocprop
93
+                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop
94 94
 
95 95
                     // fuer alte Versionen von OCProp
96 96
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         $oldDescMode = $descMode;
124 124
                     }
125 125
 
126
-                    $short_desc = $_POST['short_desc'];  // Ocprop
126
+                    $short_desc = $_POST['short_desc']; // Ocprop
127 127
                     $hint = htmlspecialchars($_POST['hints'], ENT_COMPAT, 'UTF-8');
128 128
                     $desclang = $_POST['desclang'];
129 129
                     $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     }
139 139
 
140 140
                     // Text from textarea
141
-                    $desc = $_POST['desc'];  // Ocprop
141
+                    $desc = $_POST['desc']; // Ocprop
142 142
 
143 143
                     // fuer alte Versionen von OCProp
144 144
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                         db_slave_exclude();
208 208
 
209 209
                         // redirect to cachepage
210
-                        tpl_redirect('editcache.php?cacheid=' . urlencode($desc_record['cache_id']));
210
+                        tpl_redirect('editcache.php?cacheid='.urlencode($desc_record['cache_id']));
211 211
                         exit;
212 212
                     } elseif (isset($_POST['show_all_langs'])) {
213 213
                         $show_all_langs = true;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                     ($show_all_langs == true) ? 1 : 0);
278 278
                 while ($rLanguage = sql_fetch_assoc($rsLanguages)) {
279 279
                     $sSelected = ($rLanguage['short'] == $desc_lang) ? ' selected="selected"' : '';
280
-                    $languages .= '<option value="' . $rLanguage['short'] . '"' . $sSelected . '>' . htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
280
+                    $languages .= '<option value="'.$rLanguage['short'].'"'.$sSelected.'>'.htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n";
281 281
                 }
282 282
                 sql_free_result($rsLanguages);
283 283
 
@@ -297,20 +297,20 @@  discard block
 block discarded – undo
297 297
                 tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8'));
298 298
                 tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8'));
299 299
                 tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8'));
300
-                tpl_set_var('reset', $reset);  // obsolete
300
+                tpl_set_var('reset', $reset); // obsolete
301 301
                 tpl_set_var('submit', $submit);
302 302
 
303 303
                 // Text / normal HTML / HTML editor
304 304
                 tpl_set_var('use_tinymce', ($desc_htmledit == 1) ? 1 : 0);
305 305
 
306
-                $headers = tpl_get_var('htmlheaders') . "\n";
306
+                $headers = tpl_get_var('htmlheaders')."\n";
307 307
                 if (($desc_html == 1) && ($desc_htmledit == 1)) {
308 308
                     // TinyMCE
309
-                    $headers = tpl_get_var('htmlheaders') . "\n";
310
-                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n";
311
-                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=' . ($desc_record['cache_id'] + 0) . '&lang=' . strtolower($locale) . '"></script>' . "\n";
309
+                    $headers = tpl_get_var('htmlheaders')."\n";
310
+                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n";
311
+                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid='.($desc_record['cache_id'] + 0).'&lang='.strtolower($locale).'"></script>'."\n";
312 312
                 }
313
-                $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
313
+                $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n";
314 314
                 tpl_set_var('htmlheaders', $headers);
315 315
             } else {
316 316
                 // @todo: not the owner
Please login to merge, or discard this patch.