Completed
Push — master ( c2d7ad...3f78da )
by Thomas
07:29
created
local/devel/style-cleanup.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
     'htdocs/vendor',
35 35
 );
36 36
 
37
-chdir(__DIR__ . '/../..');
37
+chdir(__DIR__.'/../..');
38 38
 
39 39
 $cleanup = new StyleCleanup();
40 40
 $cleanup->run('.', $exclude);
41 41
 
42 42
 echo
43
-    $cleanup->getLinesModified() . ' lines in ' . $cleanup->getFilesModified() . ' files'
43
+    $cleanup->getLinesModified().' lines in '.$cleanup->getFilesModified().' files'
44 44
     . " have been cleaned up\n";
45 45
 
46 46
 
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
             # process files in $path
81 81
 
82 82
             $files = array_merge(
83
-                glob($path . '/*.php'),
84
-                glob($path . '/*.tpl')
83
+                glob($path.'/*.php'),
84
+                glob($path.'/*.tpl')
85 85
             );
86 86
 
87 87
             foreach ($files as $filepath) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
                 if (count($lines) && preg_match('/^(.+?)\<\?/', $lines[0], $matches)) {
95 95
                     self::warn(
96
-                        'invalid character(s) "' . $matches[1] . '" at start of ' . $display_filepath
96
+                        'invalid character(s) "'.$matches[1].'" at start of '.$display_filepath
97 97
                     );
98 98
                 }
99 99
 
@@ -108,19 +108,19 @@  discard block
 block discarded – undo
108 108
                         && !preg_match("/^ *(\\*|\/\/|#) *\n$/", $line)) {
109 109
 
110 110
                         $old_line = $line;
111
-                        $line = rtrim($line);   # trims " \t\n\r\0\x0B"
111
+                        $line = rtrim($line); # trims " \t\n\r\0\x0B"
112 112
                         $line = $this->expandTabs($line);
113 113
                         $line .= "\n";
114 114
 
115 115
                         if ($line != $old_line) {
116 116
                             $file_modified = true;
117
-                            ++ $this->lines_modified;
117
+                            ++$this->lines_modified;
118 118
                         }
119 119
                     }
120 120
                     if (preg_match('/\<\?\s/', $line)) {   # relies on \n at EOL
121
-                        self::warn('short open tag in line ' . $n . ' of ' . $display_filepath);
121
+                        self::warn('short open tag in line '.$n.' of '.$display_filepath);
122 122
                     }
123
-                    ++ $n;
123
+                    ++$n;
124 124
                 }
125 125
 
126 126
                 # remove PHP close tags and empty lines from end of file
@@ -131,23 +131,23 @@  discard block
 block discarded – undo
131 131
                     if ($trimmed_line == '?>' || $trimmed_line == '') {
132 132
                         unset($lines[$l]);
133 133
                         $file_modified = true;
134
-                        ++ $this->lines_modified;
134
+                        ++$this->lines_modified;
135 135
                     } else {
136 136
                         break;
137 137
                     }
138
-                    -- $l;
138
+                    --$l;
139 139
                 }
140 140
 
141 141
                 if ($file_modified) {
142
-                    echo 'cleaned ' . substr($filepath, 2) . "\n";
142
+                    echo 'cleaned '.substr($filepath, 2)."\n";
143 143
                     file_put_contents($filepath, implode('', $lines));
144
-                    ++ $this->files_modified;
144
+                    ++$this->files_modified;
145 145
                 }
146 146
             }
147 147
 
148 148
             # process subdirectories in $path
149 149
 
150
-            $dirs = glob($path . '/*', GLOB_ONLYDIR);
150
+            $dirs = glob($path.'/*', GLOB_ONLYDIR);
151 151
             foreach ($dirs as $dir) {
152 152
                 if ($dir != '.' && $dir != '..') {
153 153
                     $this->cleanup($dir);
@@ -170,6 +170,6 @@  discard block
 block discarded – undo
170 170
 
171 171
     private static function warn($msg)
172 172
     {
173
-        echo '! ' . $msg . "\n";
173
+        echo '! '.$msg."\n";
174 174
     }
175 175
 }
Please login to merge, or discard this patch.
local/devel/find_bad_encodings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *  Searches for files which are no longer Unicode-encoded
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 {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 function test_encoding($path)
43 43
 {
44
-    static $ur_exclude = [  // no unicode reminder needed
44
+    static $ur_exclude = [// no unicode reminder needed
45 45
         'lang/de/ocstyle/search1/search.result.caches',
46 46
         'lib2/b2evo-captcha',
47 47
         'lib2/HTMLPurifier',
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         if (mb_trim(mb_substr($contents, $ur + 17, 2)) != "メモ") {
58 58
             $ur = mb_stripos($contents, "Unicode Reminder");
59 59
             if (mb_trim(mb_substr($contents, $ur + 17, 2)) != "メモ") {
60
-                echo "Bad Unicode Reminder found in $path: " . mb_trim(mb_substr($contents, $ur + 17, 2)) . "\n";
60
+                echo "Bad Unicode Reminder found in $path: ".mb_trim(mb_substr($contents, $ur + 17, 2))."\n";
61 61
             } else {
62 62
                 echo "Unexpected non-ASCII chars (BOMs?) in header of $path\n";
63 63
             }
Please login to merge, or discard this patch.
local/prodsys/phpzip.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 $zipper['bzip2'] = 'nice --adjustment=19 bzip2 -1 -c {src} > {dst}';
21 21
 
22 22
 if ($argv[1] == '--help') {
23
-    echo $argv[0] . " --type=<ziptype> --src=<source> --dst=<destination>
23
+    echo $argv[0]." --type=<ziptype> --src=<source> --dst=<destination>
24 24
 --type   can be zip, gzip or bzip2
25 25
 --src    relative* path to source file
26 26
 --dst    relative* path to destination file
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
             6
37 37
         ) != '--dst=')
38 38
 ) {
39
-    die("wrong paramter\nuse " . $argv[0] . " --help\n");
39
+    die("wrong paramter\nuse ".$argv[0]." --help\n");
40 40
 }
41 41
 
42 42
 if (isset($argv[4])) {
43
-    die("wrong paramter\nuse " . $argv[0] . " --help\n");
43
+    die("wrong paramter\nuse ".$argv[0]." --help\n");
44 44
 }
45 45
 
46 46
 $type = substr($argv[1], 7);
@@ -48,26 +48,26 @@  discard block
 block discarded – undo
48 48
 $dst = substr($argv[3], 6);
49 49
 
50 50
 if (!isset($zipper[$type])) {
51
-    die("invaild zip type\nuse " . $argv[0] . " --help\n");
51
+    die("invaild zip type\nuse ".$argv[0]." --help\n");
52 52
 }
53 53
 
54 54
 if (checkpath($src) == false) {
55
-    die("invaild src\nuse " . $argv[0] . " --help\n");
55
+    die("invaild src\nuse ".$argv[0]." --help\n");
56 56
 }
57 57
 
58 58
 if (checkpath($dst) == false) {
59
-    die("invaild dst\nuse " . $argv[0] . " --help\n");
59
+    die("invaild dst\nuse ".$argv[0]." --help\n");
60 60
 }
61 61
 
62
-$src = $basedir . $src;
63
-$dst = $basedir . $dst;
62
+$src = $basedir.$src;
63
+$dst = $basedir.$dst;
64 64
 
65 65
 if (!file_exists($src)) {
66
-    die("error: source not exist\nuse " . $argv[0] . " --help\n");
66
+    die("error: source not exist\nuse ".$argv[0]." --help\n");
67 67
 }
68 68
 
69 69
 if (file_exists($dst)) {
70
-    die("error: destination already exists\nuse " . $argv[0] . " --help\n");
70
+    die("error: destination already exists\nuse ".$argv[0]." --help\n");
71 71
 }
72 72
 
73 73
 $cmd = $zipper[$type];
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         return false;
85 85
     }
86 86
 
87
-    for ($i = 0; $i < count($parts); $i ++) {
87
+    for ($i = 0; $i < count($parts); $i++) {
88 88
         if (($parts[$i] == '..') || ($parts[$i] == '.')) {
89 89
             return false;
90 90
         }
Please login to merge, or discard this patch.
local/prodsys/purge_master_logs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     $rLastLog = mysql_fetch_array($rs);
44 44
     mysql_free_result($rs);
45 45
 
46
-    mysql_query("PURGE MASTER LOGS TO '" . mysql_real_escape_string($rLastLog[0], $dblink) . "'", $dblink);
46
+    mysql_query("PURGE MASTER LOGS TO '".mysql_real_escape_string($rLastLog[0], $dblink)."'", $dblink);
47 47
 }
48 48
 
49 49
 mysql_close($dblink);
Please login to merge, or discard this patch.
local/ocxml11client/settings-dist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
 
23 23
 // Bilder downloaden?
24 24
 $opt['pictures']['download'] = 1;
25
-$opt['pictures']['directory'] = $rootpath . 'images/uploads/';
25
+$opt['pictures']['directory'] = $rootpath.'images/uploads/';
26 26
 $opt['pictures']['url'] = 'http://www.so-komm-ich-uebers-web-da.hin/www.opencaching.de/html/images/uploads/';
27 27
 
28 28
 // Sessions verwenden?
29 29
 $opt['session'] = 1;
30
-$opt['zip'] = 'gzip';                // 0; zip; bzip2; gzip
30
+$opt['zip'] = 'gzip'; // 0; zip; bzip2; gzip
31 31
 
32 32
 // Gebietsauswahl nach Land
33 33
 $opt['bycountry'] = 0;
Please login to merge, or discard this patch.
local/stat/coordstat.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 // statistical data for cache and log activity map
9 9
 // optional script to be released locally into htdocs/api/stat
10 10
 
11
-$opt['rootpath'] = __DIR__ . '/../../htdocs/';
12
-require $opt['rootpath'] . 'lib2/web.inc.php';
11
+$opt['rootpath'] = __DIR__.'/../../htdocs/';
12
+require $opt['rootpath'].'lib2/web.inc.php';
13 13
 
14 14
 error_reporting(error_reporting() & ~E_NOTICE);
15 15
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     $year = substr($cache['date_created'], 0, 4);
27 27
     if ($year >= 2005 && $year <= date("Y") && ($lat != 0 || $long != 0)) {
28 28
         $years[$year] = true;
29
-        $liste[$lat][$long]["caches"][$year] ++;
29
+        $liste[$lat][$long]["caches"][$year]++;
30 30
     }
31 31
 }
32 32
 mysql_free_result($rs);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $year = substr($cache["date"], 0, 4);
51 51
         if ($year >= 2005 && $year <= date("Y") && ($lat != 0 || $long != 0)) {
52 52
             $years[$year] = true;
53
-            $liste[$lat][$long]["logs"][$year] ++;
53
+            $liste[$lat][$long]["logs"][$year]++;
54 54
         }
55 55
     }
56 56
     mysql_free_result($rs);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 while ($cache = sql_fetch_assoc($rs)) {
68 68
     $lat = floor($cache["latitude"] / $grid);
69 69
     $long = floor($cache["longitude"] / $grid);
70
-    $liste[$lat][$long]["caches"]["all"] ++;
70
+    $liste[$lat][$long]["caches"]["all"]++;
71 71
     $liste[$lat][$long]["logs"]["all"] += $cache["logs"];
72 72
 }
73 73
 mysql_free_result($rs);
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 
90 90
 foreach ($liste as $lat => $liste2) {
91 91
     foreach ($liste2 as $long => $cachecounts) {
92
-        echo ($lat * $grid + 0.5 * $grid) . ',' . ($long * $grid + 0.5 * $grid) . ',' .
93
-            $cachecounts['caches']['all'] . ',' .
92
+        echo ($lat * $grid + 0.5 * $grid).','.($long * $grid + 0.5 * $grid).','.
93
+            $cachecounts['caches']['all'].','.
94 94
             $cachecounts['logs']['all'];
95 95
         foreach ($years as $year => $dummy) {
96
-            echo ',' . $cachecounts["caches"][$year] . ',' . $cachecounts["logs"][$year];
96
+            echo ','.$cachecounts["caches"][$year].','.$cachecounts["logs"][$year];
97 97
         }
98 98
         echo "\r\n";
99 99
     }
Please login to merge, or discard this patch.
local/stat/newimages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 // list of new images
9 9
 // optional script to be released locally into htdocs/api/stat
10 10
 
11
-$opt['rootpath'] = __DIR__ . '/../../htdocs/';
12
-require $opt['rootpath'] . 'lib2/web.inc.php';
11
+$opt['rootpath'] = __DIR__.'/../../htdocs/';
12
+require $opt['rootpath'].'lib2/web.inc.php';
13 13
 
14 14
 if (!isset($_REQUEST['since'])) {
15 15
     exit;
@@ -23,6 +23,6 @@  discard block
 block discarded – undo
23 23
     $since
24 24
 );
25 25
 while ($pic = sql_fetch_assoc($rs)) {
26
-    echo $pic['url'] . "\n";
26
+    echo $pic['url']."\n";
27 27
 }
28 28
 mysql_free_result($rs);
Please login to merge, or discard this patch.
htdocs/dbmaintain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 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
 $tpl->name = 'event_attendance';
11 11
 $tpl->popup = true;
Please login to merge, or discard this patch.
htdocs/newemail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 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
 $tpl->name = 'event_attendance';
11 11
 $tpl->popup = true;
Please login to merge, or discard this patch.