Completed
Pull Request — master (#314)
by Thomas
07:14
created
htdocs/lang/de/ocstyle/newdesc.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 $submit = t('Add');
19 19
 $default_lang = t('EN');
20 20
  
21
-$lang_message = '<br/><span class="errormsg">' . t('There already exists a description in this language') . '</span>';
22
-$error_no_lang_selected = '&nbsp;<span class="errormsg">' . t('Please select a language.') . "</span>";
23
-$show_all_langs_submit = '&nbsp;<input type="submit" name="show_all_langs_submit" value="' . t('Show all') . '" class="formbutton" onclick="submitbutton(\'show_all_langs_submit\')" />';
21
+$lang_message = '<br/><span class="errormsg">'.t('There already exists a description in this language').'</span>';
22
+$error_no_lang_selected = '&nbsp;<span class="errormsg">'.t('Please select a language.')."</span>";
23
+$show_all_langs_submit = '&nbsp;<input type="submit" name="show_all_langs_submit" value="'.t('Show all').'" class="formbutton" onclick="submitbutton(\'show_all_langs_submit\')" />';
Please login to merge, or discard this patch.
htdocs/lang/de/ocstyle/lib/menu.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     /* selmenuitem contains the selected (bold) menu item */
286 286
     global $mnu_selmenuitem;
287 287
 
288
-    for ($i = 0, $ret = - 1; ($i < count($menustructure)) && ($ret == - 1); $i ++) {
288
+    for ($i = 0, $ret = - 1; ($i < count($menustructure)) && ($ret == - 1); $i++) {
289 289
         if ($menustructure[$i]['siteid'] == $pageid) {
290 290
             $mnu_selmenuitem = $menustructure[$i];
291 291
 
@@ -313,22 +313,22 @@  discard block
 block discarded – undo
313 313
     global $menu;
314 314
     $c = 0;
315 315
     $max = count($menu);
316
-    for ($i = 0; $i < $max; $i ++) {
316
+    for ($i = 0; $i < $max; $i++) {
317 317
         if ($menu[$i]['visible'] == true) {
318 318
             $sTarget = isset($menu[$i]['target']) ? $menu[$i]['target'] : '';
319
-            $sItem = '<a href="' . $menu[$i]['filename'] . '" ' . $sTarget . '>' . htmlspecialchars(t($menu[$i]['menustring']), ENT_COMPAT, 'UTF-8') . '</a>';
320
-            $sItemSel = '<a href="' . $menu[$i]['filename'] . '" ' . $sTarget . ' class=\'selected bg-green06\'>' . htmlspecialchars(t($menu[$i]['menustring']), ENT_COMPAT, 'UTF-8') . '</a>';
319
+            $sItem = '<a href="'.$menu[$i]['filename'].'" '.$sTarget.'>'.htmlspecialchars(t($menu[$i]['menustring']), ENT_COMPAT, 'UTF-8').'</a>';
320
+            $sItemSel = '<a href="'.$menu[$i]['filename'].'" '.$sTarget.' class=\'selected bg-green06\'>'.htmlspecialchars(t($menu[$i]['menustring']), ENT_COMPAT, 'UTF-8').'</a>';
321 321
 
322 322
             if ($menu[$i]['siteid'] == $selmenuid) {
323 323
                 /* $sItem = '<li>TODO:selected' . $sItem . '</li>'; */
324
-                $sItem = '<li>' . $sItemSel . '</li>';
324
+                $sItem = '<li>'.$sItemSel.'</li>';
325 325
             } else {
326
-                $sItem = '<li>' . $sItem . '</li>';
326
+                $sItem = '<li>'.$sItem.'</li>';
327 327
             }
328 328
 
329
-            echo $sItem . "\n";
329
+            echo $sItem."\n";
330 330
 
331
-            $c ++;
331
+            $c++;
332 332
         }
333 333
     }
334 334
 }
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
     if (!$bHasSubmenu) {
350 350
         /* prüfen, ob ein Submenü vorhanden ist */
351
-        for ($i = 0, $bSubmenu = false; ($i < count($menustructure)) && ($bSubmenu == false); $i ++) {
351
+        for ($i = 0, $bSubmenu = false; ($i < count($menustructure)) && ($bSubmenu == false); $i++) {
352 352
             if (isset($menustructure[$i]['submenu'])) {
353 353
                 $bSubmenu = true;
354 354
             }
@@ -365,19 +365,19 @@  discard block
 block discarded – undo
365 365
         }
366 366
     }
367 367
     $maxMenuStructure = count($menustructure);
368
-    for ($i = 0; $i < $maxMenuStructure; $i ++) {
368
+    for ($i = 0; $i < $maxMenuStructure; $i++) {
369 369
         if ($menustructure[$i]['visible'] == true) {
370 370
             if ($menustructure[$i]['siteid'] == $pageid) {
371
-                echo '<li class="' . $cssclass . ' group_active"><a href="' . $menustructure[$i]['filename'] . '">' . htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8') . '</a></li>' . "\n";
371
+                echo '<li class="'.$cssclass.' group_active"><a href="'.$menustructure[$i]['filename'].'">'.htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8').'</a></li>'."\n";
372 372
             } else {
373 373
                 if (isset($menustructure[$i]['submenu'])) {
374 374
                     if (mnu_IsMenuParentOf($menustructure[$i]['submenu'], $pageid)) {
375
-                        echo '<li class="' . $cssclass . ' group_active"><a href="' . $menustructure[$i]['filename'] . '">' . htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8') . '</a></li>' . "\n";
375
+                        echo '<li class="'.$cssclass.' group_active"><a href="'.$menustructure[$i]['filename'].'">'.htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8').'</a></li>'."\n";
376 376
                     } else {
377
-                        echo '<li class="' . $cssclass . '"><a href="' . $menustructure[$i]['filename'] . '">' . htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8') . '</a></li>' . "\n";
377
+                        echo '<li class="'.$cssclass.'"><a href="'.$menustructure[$i]['filename'].'">'.htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8').'</a></li>'."\n";
378 378
                     }
379 379
                 } else {
380
-                    echo '<li class="' . $cssclass . '"><a href="' . $menustructure[$i]['filename'] . '">' . htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8') . '</a></li>' . "\n";
380
+                    echo '<li class="'.$cssclass.'"><a href="'.$menustructure[$i]['filename'].'">'.htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8').'</a></li>'."\n";
381 381
                 }
382 382
             }
383 383
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
  */
398 398
 function mnu_IsMenuParentOf($parentmenuitems, $menuitemid)
399 399
 {
400
-    for ($i = 0; $i < count($parentmenuitems); $i ++) {
400
+    for ($i = 0; $i < count($parentmenuitems); $i++) {
401 401
         if ($parentmenuitems[$i]['siteid'] == $menuitemid) {
402 402
             return true;
403 403
         }
@@ -439,15 +439,15 @@  discard block
 block discarded – undo
439 439
 function mnu_prv_EchoBreadCrumbSubItem($pageid, $menustructure)
440 440
 {
441 441
     $maxMenuStructure = count($menustructure);
442
-    for ($i = 0; $i < $maxMenuStructure; $i ++) {
442
+    for ($i = 0; $i < $maxMenuStructure; $i++) {
443 443
         if ($menustructure[$i]['siteid'] == $pageid) {
444
-            echo '&nbsp;&gt;&nbsp;' . htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8');
444
+            echo '&nbsp;&gt;&nbsp;'.htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8');
445 445
 
446 446
             return;
447 447
         } else {
448 448
             if (isset($menustructure[$i]['submenu'])) {
449 449
                 if (mnu_IsMenuParentOf($menustructure[$i]['submenu'], $pageid)) {
450
-                    echo '&nbsp;&gt;&nbsp;' . htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8');
450
+                    echo '&nbsp;&gt;&nbsp;'.htmlspecialchars(t($menustructure[$i]['menustring']), ENT_COMPAT, 'UTF-8');
451 451
                     mnu_prv_EchoBreadCrumbSubItem($pageid, $menustructure[$i]['submenu']);
452 452
 
453 453
                     return;
@@ -465,6 +465,6 @@  discard block
 block discarded – undo
465 465
 {
466 466
     $helplink = helppagelink($tplname);
467 467
     if ($helplink != "") {
468
-        echo $helplink . '<img src="resource2/ocstyle/images/misc/32x32-help.png" /></a>';
468
+        echo $helplink.'<img src="resource2/ocstyle/images/misc/32x32-help.png" /></a>';
469 469
     }
470 470
 }
Please login to merge, or discard this patch.
htdocs/verifyemail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  ***************************************************************************/
7 7
 
8 8
 $disable_verifyemail = true;
9
-require __DIR__ . '/lib2/web.inc.php';
9
+require __DIR__.'/lib2/web.inc.php';
10 10
 
11 11
 $tpl->name = 'verifyemail';
12 12
 $tpl->menuitem = MNU_VERIFY_EMAIL;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     } else {
29 29
         $tpl->assign('emailadr', $user->getEMail());
30 30
         if ($user->missedDataLicenseMail()) {
31
-            $tpl->assign('datalicensemail', "<br /><br />" . file_get_contents("resource2/misc/datalicensemail.html"));
31
+            $tpl->assign('datalicensemail', "<br /><br />".file_get_contents("resource2/misc/datalicensemail.html"));
32 32
         }
33 33
         $tpl->assign('orgpage', $orgpage);
34 34
     }
Please login to merge, or discard this patch.
htdocs/picture.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  *
17 17
  ***************************************************************************/
18 18
 
19
-require __DIR__ . '/lib2/web.inc.php';
19
+require __DIR__.'/lib2/web.inc.php';
20 20
 
21 21
 $tpl->name = 'picture';
22 22
 $tpl->menuitem = MNU_CACHES_PICTURE;
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
     if (isset($_REQUEST['ok'])) { // Ocprop
76 76
         $bError = false;
77 77
 
78
-        $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1');  // Ocprop
79
-        $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false);  // Ocprop
78
+        $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop
79
+        $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop
80 80
         $picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview'] == '1');
81 81
 
82
-        $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : '';  // Ocprop
82
+        $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop
83 83
         if ($title == '' || ($picture->getObjectType() == OBJECT_CACHELOG && trim($title) == '')) {
84 84
             $tpl->assign('errortitle', true);
85 85
             $bError = true;
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                 }
136 136
             } // try saving as jpg and shrinking if > PICTURE_MAX_LONG_SIDE file
137 137
             else {
138
-                $picture->setFilenames(mb_strtolower($fname) . '.jpg');
138
+                $picture->setFilenames(mb_strtolower($fname).'.jpg');
139 139
                 if (!$picture->rotate_and_shrink($_FILES['file']['tmp_name'], PICTURE_MAX_LONG_SIDE)) {
140 140
                     $bError = true;
141 141
                 }
Please login to merge, or discard this patch.
htdocs/ocstats.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
  *  Create / redirect to statpic
8 8
  ***************************************************************************/
9 9
 
10
-require __DIR__ . '/lib2/web.inc.php';
10
+require __DIR__.'/lib2/web.inc.php';
11 11
 
12 12
 // Parameter
13 13
 $jpeg_qualitaet = 80;
14
-$fontfile = $opt['rootpath'] . 'resource2/' . $opt['template']['style'] . '/fonts/dejavu/ttf/DejaVuSans.ttf';
14
+$fontfile = $opt['rootpath'].'resource2/'.$opt['template']['style'].'/fonts/dejavu/ttf/DejaVuSans.ttf';
15 15
 
16 16
 // get userid and style from URL
17 17
 $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0;
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 
67 67
     if (sql_num_rows($rs) == 1) {
68 68
         $record = sql_fetch_array($rs);
69
-        $tplpath = $opt['rootpath'] . $record['tplpath'];
69
+        $tplpath = $opt['rootpath'].$record['tplpath'];
70 70
         $maxtextwidth = $record['maxtextwidth'];
71 71
     } else {
72
-        $tplpath = $opt['rootpath'] . 'images/ocstats1.gif';
72
+        $tplpath = $opt['rootpath'].'images/ocstats1.gif';
73 73
         $maxtextwidth = 60;
74 74
         $logo = 1;
75 75
     }
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
 }
171 171
 
172 172
 // Redirect auf das gespeicherte Bild
173
-$tpl->redirect('images/statpics/statpic' . $userid . $lang . '.jpg');
173
+$tpl->redirect('images/statpics/statpic'.$userid.$lang.'.jpg');
174 174
 
175 175
 function GetFilename($userid, $lang)
176 176
 {
177 177
     global $opt;
178 178
 
179
-    return $opt['rootpath'] . 'images/statpics/statpic' . $userid . $lang . '.jpg';
179
+    return $opt['rootpath'].'images/statpics/statpic'.$userid.$lang.'.jpg';
180 180
 }
Please login to merge, or discard this patch.
htdocs/404.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $sUserCountry = $login->getUserCountry();
11 11
 
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 if ($isRedirect404) {
28 28
     // check length
29 29
     $uril = 70;
30
-    $uri = 'http://' . strtolower($_SERVER['SERVER_NAME']) . $_SERVER['REQUEST_URI'];
30
+    $uri = 'http://'.strtolower($_SERVER['SERVER_NAME']).$_SERVER['REQUEST_URI'];
31 31
     // limit to $uril
32 32
     if (strlen($uri) > $uril) {
33
-        $uri = substr($uri, 0, $uril - 3) . '...';
33
+        $uri = substr($uri, 0, $uril - 3).'...';
34 34
     }
35 35
 
36 36
     // assign uri
Please login to merge, or discard this patch.
htdocs/restorecaches.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 
133 133
 */
134 134
 
135
-require __DIR__ . '/lib2/web.inc.php';
136
-require_once __DIR__ . '/lib2/logic/labels.inc.php';
135
+require __DIR__.'/lib2/web.inc.php';
136
+require_once __DIR__.'/lib2/logic/labels.inc.php';
137 137
 
138 138
 $tpl->name = 'restorecaches';
139 139
 $tpl->menuitem = MNU_ADMIN_RESTORE;
@@ -308,12 +308,12 @@  discard block
 block discarded – undo
308 308
 
309 309
 function get_archive_data($caches)
310 310
 {
311
-    $cachelist = "(" . implode(",", $caches) . ")";
311
+    $cachelist = "(".implode(",", $caches).")";
312 312
     $data = array();
313 313
     $admins = array();
314 314
 
315 315
     // make waypoint index
316
-    $rs = sql("SELECT `cache_id`, `wp_oc` FROM `caches` WHERE `cache_id` IN " . $cachelist);
316
+    $rs = sql("SELECT `cache_id`, `wp_oc` FROM `caches` WHERE `cache_id` IN ".$cachelist);
317 317
     while ($r = sql_fetch_assoc($rs)) {
318 318
         $wp_oc[$r['cache_id']] = $r['wp_oc'];
319 319
     }
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
             `latitude`,
329 329
             `restored_by`
330 330
         FROM `cache_coordinates`
331
-        WHERE `cache_id` IN " . $cachelist . "
331
+        WHERE `cache_id` IN " . $cachelist."
332 332
         ORDER BY `date_created` ASC"
333 333
     );
334 334
     // order is relevant, because multiple changes per day possible
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
     while ($r = sql_fetch_assoc($rs)) {
337 337
         $coord = new coordinate($r['latitude'], $r['longitude']);
338 338
         $coord = $coord->getDecimalMinutes();
339
-        $coord = $coord['lat'] . " " . $coord['lon'];
339
+        $coord = $coord['lat']." ".$coord['lon'];
340 340
         if (isset($lastcoord[$r['cache_id']]) && $coord != $lastcoord[$r['cache_id']]) {
341 341
             // the database contains lots of old coord records with unchanged coords, wtf?
342 342
             append_data($data, $admins, $wp_oc, $r, "coord", $lastcoord[$r['cache_id']], $coord);
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
     // cache country
349 349
     $rs = sql("SELECT `cache_id`, LEFT(`date_created`,10) AS `date_modified`, `country`, `restored_by`
350 350
                FROM `cache_countries`
351
-                         WHERE `cache_id` IN " . $cachelist . "
351
+                         WHERE `cache_id` IN " . $cachelist."
352 352
                          ORDER BY `date_created` ASC");
353 353
     // order is relevant, because multiple changes per day possible
354 354
     $lastcountry = array();
@@ -364,17 +364,17 @@  discard block
 block discarded – undo
364 364
     // all other cache data
365 365
     // first the current data ...
366 366
     $nextcd = array();
367
-    $rs = sql("SELECT * FROM `caches` WHERE `cache_id` IN " . $cachelist);
367
+    $rs = sql("SELECT * FROM `caches` WHERE `cache_id` IN ".$cachelist);
368 368
     while ($r = sql_fetch_assoc($rs)) {
369 369
         $nextcd[$r['wp_oc']] = $r;
370
-        $user_id = $r['user_id'];     // is used later for logs
370
+        $user_id = $r['user_id']; // is used later for logs
371 371
     }
372 372
     sql_free_result($rs);
373 373
 
374 374
     // .. and then the changes
375 375
     $rs = sql(
376 376
         "SELECT * FROM `caches_modified`
377
-        WHERE `cache_id` IN " . $cachelist . "
377
+        WHERE `cache_id` IN " . $cachelist."
378 378
         ORDER BY `date_modified` DESC"
379 379
     );
380 380
     while ($r = sql_fetch_assoc($rs)) {
@@ -417,8 +417,8 @@  discard block
 block discarded – undo
417 417
                 $wp_oc,
418 418
                 $r,
419 419
                 "time",
420
-                $r['search_time'] . '&nbsp;h',
421
-                $nextcd[$wp]['search_time'] . '&nbsp;h'
420
+                $r['search_time'].'&nbsp;h',
421
+                $nextcd[$wp]['search_time'].'&nbsp;h'
422 422
             );
423 423
         }
424 424
         if ($r['way_length'] != $nextcd[$wp]['way_length']) {
@@ -428,8 +428,8 @@  discard block
 block discarded – undo
428 428
                 $wp_oc,
429 429
                 $r,
430 430
                 "way",
431
-                $r['way_length'] . '&nbsp;km',
432
-                $nextcd[$wp]['way_length'] . '&nbsp;km'
431
+                $r['way_length'].'&nbsp;km',
432
+                $nextcd[$wp]['way_length'].'&nbsp;km'
433 433
             );
434 434
         }
435 435
         if ($r['wp_gc'] != $nextcd[$wp]['wp_gc']) {
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
     // attributes
466 466
     $rs = sql(
467 467
         "SELECT * FROM `caches_attributes_modified`
468
-        WHERE `cache_id` IN " . $cachelist . "  /* OConly attrib is shown, but not restorable */
469
-        ORDER BY `date_modified` ASC");   // order doesn't matter as long it is date only
468
+        WHERE `cache_id` IN " . $cachelist."  /* OConly attrib is shown, but not restorable */
469
+        ORDER BY `date_modified` ASC"); // order doesn't matter as long it is date only
470 470
     while ($r = sql_fetch_assoc($rs)) {
471 471
         append_data(
472 472
             $data,
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
             $wp_oc,
475 475
             $r,
476 476
             "attrib",
477
-            ($r['was_set'] ? "-" : "+") . labels::getLabelValue('cache_attrib', $r['attrib_id']),
477
+            ($r['was_set'] ? "-" : "+").labels::getLabelValue('cache_attrib', $r['attrib_id']),
478 478
             ''
479 479
         );
480 480
     }
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
             LENGTH(`short_desc`) AS `sdl`,
513 513
             `restored_by`
514 514
         FROM `cache_desc_modified`
515
-        WHERE `cache_id` IN " . $cachelist . "
515
+        WHERE `cache_id` IN " . $cachelist."
516 516
         ORDER BY `date_modified` DESC"
517 517
     );
518 518
     // order doesn't matter as long only one change per day is recorded
@@ -534,8 +534,8 @@  discard block
 block discarded – undo
534 534
                 $admins,
535 535
                 $wp_oc,
536 536
                 $r,
537
-                "desc(" . $r['language'] . ")",
538
-                $r['dl'] + 0, $next['dl'] + 0 . " bytes"
537
+                "desc(".$r['language'].")",
538
+                $r['dl'] + 0, $next['dl'] + 0." bytes"
539 539
             );
540 540
         }
541 541
         if ($r['hl'] + 0 != $next['hl'] + 0) {
@@ -544,9 +544,9 @@  discard block
 block discarded – undo
544 544
                 $admins,
545 545
                 $wp_oc,
546 546
                 $r,
547
-                "hint(" . $r['language'] . ")",
547
+                "hint(".$r['language'].")",
548 548
                 $r['hl'] + 0,
549
-                $next['hl'] + 0 . " bytes"
549
+                $next['hl'] + 0." bytes"
550 550
             );
551 551
         }
552 552
         if ($r['sdl'] + 0 != $next['sdl'] + 0) {
@@ -555,9 +555,9 @@  discard block
 block discarded – undo
555 555
                 $admins,
556 556
                 $wp_oc,
557 557
                 $r,
558
-                "shortdesc(" . $r['language'] . ")",
558
+                "shortdesc(".$r['language'].")",
559 559
                 $r['sdl'] + 0,
560
-                $next['sdl'] + 0 . " bytes"
560
+                $next['sdl'] + 0." bytes"
561 561
             );
562 562
         }
563 563
 
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
               (SELECT 1 AS `op`, `deletion_date` AS `date_modified`, `cache_id`,
581 581
                     `user_id`, `type`, `date`, `restored_by`
582 582
                    FROM `cache_logs_archived`
583
-                  WHERE `cache_id` IN " . $cachelist . "AND `deleted_by`='&1' AND `user_id`<>'&1'
583
+                  WHERE `cache_id` IN " . $cachelist."AND `deleted_by`='&1' AND `user_id`<>'&1'
584 584
                   UNION
585 585
                   SELECT 2 AS `op`, `date_modified`, `cache_id`,
586 586
                        (SELECT `user_id` FROM `cache_logs_archived` WHERE `id`=`original_id`),
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
                        (SELECT `date` FROM `cache_logs_archived` WHERE `id`=`original_id`),
589 589
                        `restored_by`
590 590
                  FROM `cache_logs_restored`
591
-                  WHERE `cache_id` IN " . $cachelist . ") `logs`
591
+                  WHERE `cache_id` IN " . $cachelist.") `logs`
592 592
                 INNER JOIN `user` ON `user`.`user_id`=`logs`.`user_id`
593 593
               ORDER BY `logs`.`date_modified` ASC",
594 594
         // order may not be exact when redoing reverts, because delete and insert
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
             $wp_oc,
603 603
             $r,
604 604
             $r["op"] == 1 ? "dellog" : "restorelog",
605
-            "<a href='viewprofile.php?userid=" . $r['user_id'] . "' target='_blank'>" . $r['username'] . "</a>/" . $r['date'],
605
+            "<a href='viewprofile.php?userid=".$r['user_id']."' target='_blank'>".$r['username']."</a>/".$r['date'],
606 606
             ''
607 607
         );
608 608
     }
@@ -618,9 +618,9 @@  discard block
 block discarded – undo
618 618
 
619 619
     $piccacheid = "IF(`object_type`=2, `object_id`, IF(`object_type`=1, IFNULL((SELECT `cache_id` FROM `cache_logs` WHERE `id`=`object_id`),(SELECT `cache_id` FROM `cache_logs_archived` WHERE `id`=`object_id`)), 0))";
620 620
     $rs = sql(
621
-        "SELECT *, " . $piccacheid . "AS `cache_id` FROM `pictures_modified`
622
-        WHERE " . $piccacheid . " IN " . $cachelist . "
623
-        ORDER BY `date_modified` ASC");  // order is relevant for the case of restore-reverts
621
+        "SELECT *, ".$piccacheid."AS `cache_id` FROM `pictures_modified`
622
+        WHERE " . $piccacheid." IN ".$cachelist."
623
+        ORDER BY `date_modified` ASC"); // order is relevant for the case of restore-reverts
624 624
     while ($r = sql_fetch_assoc($rs)) {
625 625
         $r['date_modified'] = substr($r['date_modified'], 0, 10);
626 626
         switch ($r['operation']) {
@@ -642,14 +642,14 @@  discard block
 block discarded – undo
642 642
                 $picchange .= "-cache";
643 643
                 break;
644 644
         }
645
-        append_data($data, $admins, $wp_oc, $r, $picchange . "pic", $r['title'], '');
645
+        append_data($data, $admins, $wp_oc, $r, $picchange."pic", $r['title'], '');
646 646
     }
647 647
     sql_free_result($rs);
648 648
 
649 649
     // admins
650 650
     foreach ($admins as $adate => $adata) {
651 651
         foreach ($adata as $awp => $alist) {
652
-            $data[$adate][$awp] .= "<br /><strong class='adminrestore'>admins:</strong> " . implode(',', $alist);
652
+            $data[$adate][$awp] .= "<br /><strong class='adminrestore'>admins:</strong> ".implode(',', $alist);
653 653
         }
654 654
     }
655 655
 
@@ -698,9 +698,9 @@  discard block
 block discarded – undo
698 698
     } else {
699 699
         $text .= " class='userchange'";
700 700
     }
701
-    $text .= ">$field</strong>: $oldvalue" . ($newvalue != "" ? " &rarr; $newvalue" : "");
701
+    $text .= ">$field</strong>: $oldvalue".($newvalue != "" ? " &rarr; $newvalue" : "");
702 702
     if (isset($data[$mdate][$wp])) {
703
-        $data[$mdate][$wp] .= ", " . $text;
703
+        $data[$mdate][$wp] .= ", ".$text;
704 704
     } else {
705 705
         $data[$mdate][$wp] = $text;
706 706
     }
@@ -713,8 +713,8 @@  discard block
 block discarded – undo
713 713
             $admins[$mdate][$wp] = [];
714 714
         }
715 715
         $admins[$mdate][$wp][$r['restored_by'] + 0]
716
-            = "<a href='viewprofile.php?userid=" . $r['restored_by'] . "' target='_blank'>" .
717
-            sql_value("SELECT `username` FROM `user` WHERE `user_id`='&1'", "", $r['restored_by']) .
716
+            = "<a href='viewprofile.php?userid=".$r['restored_by']."' target='_blank'>".
717
+            sql_value("SELECT `username` FROM `user` WHERE `user_id`='&1'", "", $r['restored_by']).
718 718
             "</a>";
719 719
     }
720 720
 }
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 {
725 725
     global $opt, $login;
726 726
 
727
-    sql("SET @restoredby='&1'", $login->userid);         // is evaluated by trigger functions
727
+    sql("SET @restoredby='&1'", $login->userid); // is evaluated by trigger functions
728 728
     sql_slave("SET @restoredby='&1'", $login->userid);
729 729
 
730 730
     $restored = array();
@@ -834,12 +834,12 @@  discard block
 block discarded – undo
834 834
                     if ($setfields != "") {
835 835
                         $setfields .= ",";
836 836
                     }
837
-                    $setfields .= "`$field`='" . sql_escape($r[$field]) . "'";
837
+                    $setfields .= "`$field`='".sql_escape($r[$field])."'";
838 838
                     $restored[$wp][$field] = true;
839 839
                 }
840 840
             }
841 841
             if ($setfields != "" && !$simulate) {
842
-                sql("UPDATE `caches` SET " . $setfields . " WHERE `cache_id`='&1'", $cacheid);
842
+                sql("UPDATE `caches` SET ".$setfields." WHERE `cache_id`='&1'", $cacheid);
843 843
             }
844 844
         }
845 845
         sql_free_result($rs);
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
                         // id, uuid, date_created and last_modified are set automatically;
1017 1017
                         // picture will be updated automatically on picture-restore
1018 1018
                         $log = new cachelog();
1019
-                        $log->setNode($r['node']);  // cachelog class currently does not initialize node field
1019
+                        $log->setNode($r['node']); // cachelog class currently does not initialize node field
1020 1020
                         $log->setCacheId($r['cache_id']);
1021 1021
                         $log->setUserId($r['user_id']);
1022 1022
                         $log->setType($r['type'], true);
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
                 }  // not already processed
1069 1069
 
1070 1070
                 if ($error != "") {
1071
-                    $restored[$wp]['internal error - could not $error log ' + $r['id'] + "/" + $logid];
1071
+                    $restored[$wp]['internal error - could not $error log ' +$r['id'] + "/" +$logid];
1072 1072
                 }
1073 1073
                 if ($logs_restored) {
1074 1074
                     $restored[$wp]['logs'] = true;
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
                 }  // not already processed
1203 1203
 
1204 1204
                 if ($error != "") {
1205
-                    $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" + $picid] = true;
1205
+                    $restored[$wp]['internal error - could not $error picture '.$r['id'] + "/" +$picid] = true;
1206 1206
                 }
1207 1207
                 if ($pics_restored) {
1208 1208
                     $restored[$wp]['pictures'] = true;
Please login to merge, or discard this patch.
htdocs/api/email_problems.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-$opt['rootpath'] = __DIR__ . '/../';
9
-require $opt['rootpath'] . 'lib2/web.inc.php';
8
+$opt['rootpath'] = __DIR__.'/../';
9
+require $opt['rootpath'].'lib2/web.inc.php';
10 10
 
11 11
 header('Content-type: text/plain; charset=utf-8');
12 12
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 ) {
17 17
     $rs = sql('SELECT `user_id`, `email_problems` FROM `user` WHERE `email_problems`');
18 18
     while ($r = sql_fetch_assoc($rs)) {
19
-        echo $r['user_id'] . ' ' . $r['email_problems'] . "\n";
19
+        echo $r['user_id'].' '.$r['email_problems']."\n";
20 20
     }
21 21
     sql_free_result($rs);
22 22
 }
Please login to merge, or discard this patch.
htdocs/api/hidden_caches.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
  *  replicated system than the XML interface.
10 10
  ***************************************************************************/
11 11
 
12
-$opt['rootpath'] = __DIR__ . '/../';
13
-require $opt['rootpath'] . 'lib2/web.inc.php';
12
+$opt['rootpath'] = __DIR__.'/../';
13
+require $opt['rootpath'].'lib2/web.inc.php';
14 14
 
15 15
 header('Content-type: text/plain; charset=utf-8');
16 16
 
@@ -24,5 +24,5 @@  discard block
 block discarded – undo
24 24
 );
25 25
 $wp_ocs = sql_fetch_column($rs);
26 26
 foreach ($wp_ocs as $wp_oc) {
27
-    echo $wp_oc . "\n";
27
+    echo $wp_oc."\n";
28 28
 }
Please login to merge, or discard this patch.