Completed
Push — master ( 070cbb...040530 )
by Adam
01:35
created
diff.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
                 <div class="col-md-4">
33 33
                 <select id="dir" name="dir" class="form-control">
34 34
                     <option value="1">base, boot</option>
35
-                    <option value="2" <?php if(isset($_GET["dir"]) && $_GET["dir"] == '2'){echo("selected");}?>>dll</option>
36
-                    <option value="3" <?php if(isset($_GET["dir"]) && $_GET["dir"] == '3'){echo("selected");}?>>media, subsystems, win32ss</option>
37
-                    <option value="100" <?php if(isset($_GET["dir"]) && $_GET["dir"] == '100'){echo("selected");}?>>All ReactOS Source dir</option>
35
+                    <option value="2" <?php if (isset($_GET["dir"]) && $_GET["dir"] == '2') {echo("selected"); }?>>dll</option>
36
+                    <option value="3" <?php if (isset($_GET["dir"]) && $_GET["dir"] == '3') {echo("selected"); }?>>media, subsystems, win32ss</option>
37
+                    <option value="100" <?php if (isset($_GET["dir"]) && $_GET["dir"] == '100') {echo("selected"); }?>>All ReactOS Source dir</option>
38 38
                 </select>
39 39
                 </div>
40 40
             </div>
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
     switch ($_GET["dir"])
54 54
     {
55 55
         case "1":
56
-            $directory1 = new RecursiveDirectoryIterator($ROSDir. "base/applications");
57
-            $directory2 = new RecursiveDirectoryIterator($ROSDir. "base/setup");
58
-            $directory3 = new RecursiveDirectoryIterator($ROSDir. "base/shell");
59
-            $directory4 = new RecursiveDirectoryIterator($ROSDir. "base/system");
60
-            $directory5 = new RecursiveDirectoryIterator($ROSDir. "boot/freeldr/fdebug");
56
+            $directory1 = new RecursiveDirectoryIterator($ROSDir."base/applications");
57
+            $directory2 = new RecursiveDirectoryIterator($ROSDir."base/setup");
58
+            $directory3 = new RecursiveDirectoryIterator($ROSDir."base/shell");
59
+            $directory4 = new RecursiveDirectoryIterator($ROSDir."base/system");
60
+            $directory5 = new RecursiveDirectoryIterator($ROSDir."boot/freeldr/fdebug");
61 61
 
62 62
             $it = new AppendIterator();
63 63
             $it->append(new RecursiveIteratorIterator($directory1));
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
             break;
69 69
 
70 70
         case "2":
71
-            $directory6 = new RecursiveDirectoryIterator($ROSDir. "dll/cpl");
72
-            $directory7 = new RecursiveDirectoryIterator($ROSDir. "dll/shellext");
73
-            $directory8 = new RecursiveDirectoryIterator($ROSDir. "dll/win32");
71
+            $directory6 = new RecursiveDirectoryIterator($ROSDir."dll/cpl");
72
+            $directory7 = new RecursiveDirectoryIterator($ROSDir."dll/shellext");
73
+            $directory8 = new RecursiveDirectoryIterator($ROSDir."dll/win32");
74 74
 
75 75
             $it = new AppendIterator();
76 76
             $it->append(new RecursiveIteratorIterator($directory6));
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
             break;
80 80
 
81 81
         case "3":
82
-            $directory9 = new RecursiveDirectoryIterator($ROSDir. "media/themes");
83
-            $directory10 = new RecursiveDirectoryIterator($ROSDir. "subsystems/mvdm/ntvdm");
84
-            $directory11 = new RecursiveDirectoryIterator($ROSDir. "win32ss/user");
82
+            $directory9 = new RecursiveDirectoryIterator($ROSDir."media/themes");
83
+            $directory10 = new RecursiveDirectoryIterator($ROSDir."subsystems/mvdm/ntvdm");
84
+            $directory11 = new RecursiveDirectoryIterator($ROSDir."win32ss/user");
85 85
 
86 86
             $it = new AppendIterator();
87 87
             $it->append(new RecursiveIteratorIterator($directory9));
@@ -144,30 +144,30 @@  discard block
 block discarded – undo
144 144
 
145 145
     set_error_handler('exceptions_error_handler');
146 146
 
147
-    $regex = new RegexIterator($it, '/^.+'. $langDir .'.+('. $originLang .')\.'. $fileExt .'$/i', RecursiveRegexIterator::GET_MATCH);
147
+    $regex = new RegexIterator($it, '/^.+'.$langDir.'.+('.$originLang.')\.'.$fileExt.'$/i', RecursiveRegexIterator::GET_MATCH);
148 148
 
149 149
     $missing = $allStrings = 0;
150 150
 
151 151
     $lang = htmlspecialchars($_GET["lang"]);
152 152
     // Search for eg. PL,Pl,pl
153
-    $fileSearch = strtoupper($lang) .",". ucfirst($lang) .",". strtolower($lang);
153
+    $fileSearch = strtoupper($lang).",".ucfirst($lang).",".strtolower($lang);
154 154
 
155 155
     // ReactOS and Wine Strings - array
156 156
     $ignoredROSStrings = file($ROSSpellFilename, FILE_IGNORE_NEW_LINES);
157 157
     $ignoredWineStrings = file($wineSpellFilename, FILE_IGNORE_NEW_LINES);
158 158
 
159 159
     $regex->rewind();
160
-    while($regex->valid())
160
+    while ($regex->valid())
161 161
     {
162 162
         if (!$regex->isDot())
163 163
         {
164
-            $file = glob($regex->getPathInfo() ."/*{". $fileSearch ."}*.". $fileExt, GLOB_BRACE);
164
+            $file = glob($regex->getPathInfo()."/*{".$fileSearch."}*.".$fileExt, GLOB_BRACE);
165 165
 
166 166
             $isFile = array_filter($file);
167 167
 
168 168
             if (empty($isFile))
169 169
             {
170
-                echo '<b>No translation</b> for path '. $regex->getPathInfo() .'<hr>';
170
+                echo '<b>No translation</b> for path '.$regex->getPathInfo().'<hr>';
171 171
             } else
172 172
             {
173 173
                 $fileContent1 = file_get_contents($regex->key());
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
                 if ($array['diff'])
179 179
                 {
180
-                    echo $regex->getPathInfo() .'<br><br>';
180
+                    echo $regex->getPathInfo().'<br><br>';
181 181
 
182 182
                     $currentMissing = $missing;
183 183
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                             // Check if this same and ignore some words
190 190
                             if ($english === $array['rightVersion'][$index] && !in_array($english, $ignoredROSStrings) && !in_array($english, $ignoredWineStrings))
191 191
                             {
192
-                            	echo "<b>Missing translation:</b> ". htmlspecialchars($english) ."<br>";
192
+                            	echo "<b>Missing translation:</b> ".htmlspecialchars($english)."<br>";
193 193
                                 $missing++;
194 194
                             }
195 195
                             $allStrings++;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                             // Check if this same and ignore some words
190 190
                             if ($english === $array['rightVersion'][$index] && !in_array($english, $ignoredROSStrings) && !in_array($english, $ignoredWineStrings))
191 191
                             {
192
-                            	echo "<b>Missing translation:</b> ". htmlspecialchars($english) ."<br>";
192
+                                echo "<b>Missing translation:</b> ". htmlspecialchars($english) ."<br>";
193 193
                                 $missing++;
194 194
                             }
195 195
                             $allStrings++;
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                     }
203 203
                     if ($currentMissing == $missing)
204 204
                     {
205
-                    	echo "Seems OK :) Some strings was ignored by ReactOS and Wine spell files.<br>";
205
+                        echo "Seems OK :) Some strings was ignored by ReactOS and Wine spell files.<br>";
206 206
                     }
207 207
 
208 208
                     echo "<hr>";
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
 
36 36
     if ($test === false)
37 37
     {
38
-        $directory1 = new RecursiveDirectoryIterator($ROSDir. "base/applications");
39
-        $directory2 = new RecursiveDirectoryIterator($ROSDir. "base/setup");
40
-        $directory3 = new RecursiveDirectoryIterator($ROSDir. "base/shell");
41
-        $directory4 = new RecursiveDirectoryIterator($ROSDir. "base/system");
42
-        $directory5 = new RecursiveDirectoryIterator($ROSDir. "boot/freeldr/fdebug");
38
+        $directory1 = new RecursiveDirectoryIterator($ROSDir."base/applications");
39
+        $directory2 = new RecursiveDirectoryIterator($ROSDir."base/setup");
40
+        $directory3 = new RecursiveDirectoryIterator($ROSDir."base/shell");
41
+        $directory4 = new RecursiveDirectoryIterator($ROSDir."base/system");
42
+        $directory5 = new RecursiveDirectoryIterator($ROSDir."boot/freeldr/fdebug");
43 43
 
44
-        $directory6 = new RecursiveDirectoryIterator($ROSDir. "dll/cpl");
45
-        $directory7 = new RecursiveDirectoryIterator($ROSDir. "dll/shellext");
46
-        $directory8 = new RecursiveDirectoryIterator($ROSDir. "dll/win32");
44
+        $directory6 = new RecursiveDirectoryIterator($ROSDir."dll/cpl");
45
+        $directory7 = new RecursiveDirectoryIterator($ROSDir."dll/shellext");
46
+        $directory8 = new RecursiveDirectoryIterator($ROSDir."dll/win32");
47 47
 
48
-        $directory9 = new RecursiveDirectoryIterator($ROSDir. "media/themes");
49
-        $directory10 = new RecursiveDirectoryIterator($ROSDir. "subsystems/mvdm/ntvdm");
50
-        $directory11 = new RecursiveDirectoryIterator($ROSDir. "win32ss/user");
48
+        $directory9 = new RecursiveDirectoryIterator($ROSDir."media/themes");
49
+        $directory10 = new RecursiveDirectoryIterator($ROSDir."subsystems/mvdm/ntvdm");
50
+        $directory11 = new RecursiveDirectoryIterator($ROSDir."win32ss/user");
51 51
 
52 52
         $it->append(new RecursiveIteratorIterator($directory1));
53 53
         $it->append(new RecursiveIteratorIterator($directory2));
@@ -67,25 +67,25 @@  discard block
 block discarded – undo
67 67
         $it->append(new RecursiveIteratorIterator($directory));
68 68
     }
69 69
 
70
-    $regex = new RegexIterator($it, '/^.+'. $langDir .'.+('. $originLang .')\.'. $fileExt .'$/i', RecursiveRegexIterator::GET_MATCH);
70
+    $regex = new RegexIterator($it, '/^.+'.$langDir.'.+('.$originLang.')\.'.$fileExt.'$/i', RecursiveRegexIterator::GET_MATCH);
71 71
 
72 72
     $allEnglish = $missingFiles = 0;
73 73
 
74 74
     $lang = htmlspecialchars($_GET["lang"]);
75 75
     // Search for eg. PL,Pl,pl
76
-    $fileSearch = strtoupper($lang) .",". ucfirst($lang) .",". strtolower($lang);
76
+    $fileSearch = strtoupper($lang).",".ucfirst($lang).",".strtolower($lang);
77 77
 
78 78
     $regex->rewind();
79
-    while($regex->valid())
79
+    while ($regex->valid())
80 80
     {
81 81
         if (!$regex->isDot())
82 82
         {
83
-            $file = glob($regex->getPathInfo() ."/*{". $fileSearch ."}*.". $fileExt, GLOB_BRACE);
83
+            $file = glob($regex->getPathInfo()."/*{".$fileSearch."}*.".$fileExt, GLOB_BRACE);
84 84
 
85 85
             $isFile = array_filter($file);
86 86
             if (empty($isFile))
87 87
             {
88
-                echo '<b>No translation</b> for path '. $regex->getPathInfo() .'<br>';
88
+                echo '<b>No translation</b> for path '.$regex->getPathInfo().'<br>';
89 89
                 $missingFiles++;
90 90
             }
91 91
             $allEnglish++;
Please login to merge, or discard this patch.
encoding.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
                 <div class="col-md-4">
33 33
                 <select id="dir" name="dir" class="form-control">
34 34
                     <option value="1">base, boot</option>
35
-                    <option value="2" <?php if(isset($_GET["dir"]) && $_GET["dir"] == '2'){echo("selected");}?>>dll</option>
36
-                    <option value="3" <?php if(isset($_GET["dir"]) && $_GET["dir"] == '3'){echo("selected");}?>>media, subsystems, win32ss</option>
37
-                    <option value="100" <?php if(isset($_GET["dir"]) && $_GET["dir"] == '100'){echo("selected");}?>>All ReactOS Source dir</option>
35
+                    <option value="2" <?php if (isset($_GET["dir"]) && $_GET["dir"] == '2') {echo("selected"); }?>>dll</option>
36
+                    <option value="3" <?php if (isset($_GET["dir"]) && $_GET["dir"] == '3') {echo("selected"); }?>>media, subsystems, win32ss</option>
37
+                    <option value="100" <?php if (isset($_GET["dir"]) && $_GET["dir"] == '100') {echo("selected"); }?>>All ReactOS Source dir</option>
38 38
                 </select>
39 39
                 </div>
40 40
             </div>
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
     switch ($_GET["dir"])
54 54
     {
55 55
         case "1":
56
-            $directory1 = new RecursiveDirectoryIterator($ROSDir. "base/applications");
57
-            $directory2 = new RecursiveDirectoryIterator($ROSDir. "base/setup");
58
-            $directory3 = new RecursiveDirectoryIterator($ROSDir. "base/shell");
59
-            $directory4 = new RecursiveDirectoryIterator($ROSDir. "base/system");
60
-            $directory5 = new RecursiveDirectoryIterator($ROSDir. "boot/freeldr/fdebug");
56
+            $directory1 = new RecursiveDirectoryIterator($ROSDir."base/applications");
57
+            $directory2 = new RecursiveDirectoryIterator($ROSDir."base/setup");
58
+            $directory3 = new RecursiveDirectoryIterator($ROSDir."base/shell");
59
+            $directory4 = new RecursiveDirectoryIterator($ROSDir."base/system");
60
+            $directory5 = new RecursiveDirectoryIterator($ROSDir."boot/freeldr/fdebug");
61 61
 
62 62
             $it = new AppendIterator();
63 63
             $it->append(new RecursiveIteratorIterator($directory1));
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
             break;
69 69
 
70 70
         case "2":
71
-            $directory6 = new RecursiveDirectoryIterator($ROSDir. "dll/cpl");
72
-            $directory7 = new RecursiveDirectoryIterator($ROSDir. "dll/shellext");
73
-            $directory8 = new RecursiveDirectoryIterator($ROSDir. "dll/win32");
71
+            $directory6 = new RecursiveDirectoryIterator($ROSDir."dll/cpl");
72
+            $directory7 = new RecursiveDirectoryIterator($ROSDir."dll/shellext");
73
+            $directory8 = new RecursiveDirectoryIterator($ROSDir."dll/win32");
74 74
 
75 75
             $it = new AppendIterator();
76 76
             $it->append(new RecursiveIteratorIterator($directory6));
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
             break;
80 80
 
81 81
         case "3":
82
-            $directory9 = new RecursiveDirectoryIterator($ROSDir. "media/themes");
83
-            $directory10 = new RecursiveDirectoryIterator($ROSDir. "subsystems/mvdm/ntvdm");
84
-            $directory11 = new RecursiveDirectoryIterator($ROSDir. "win32ss/user");
82
+            $directory9 = new RecursiveDirectoryIterator($ROSDir."media/themes");
83
+            $directory10 = new RecursiveDirectoryIterator($ROSDir."subsystems/mvdm/ntvdm");
84
+            $directory11 = new RecursiveDirectoryIterator($ROSDir."win32ss/user");
85 85
 
86 86
             $it = new AppendIterator();
87 87
             $it->append(new RecursiveIteratorIterator($directory9));
@@ -102,23 +102,23 @@  discard block
 block discarded – undo
102 102
             exit;
103 103
     }
104 104
 
105
-    $regex = new RegexIterator($it, '/^.+'. $langDir .'.+('. $originLang .')\.'. $fileExt .'$/i', RecursiveRegexIterator::GET_MATCH);
105
+    $regex = new RegexIterator($it, '/^.+'.$langDir.'.+('.$originLang.')\.'.$fileExt.'$/i', RecursiveRegexIterator::GET_MATCH);
106 106
 
107 107
     $allWrongEnc = 0;
108 108
 
109 109
     $lang = htmlspecialchars($_GET["lang"]);
110 110
     // Search for eg. PL,Pl,pl
111
-    $fileSearch = strtoupper($lang) .",". ucfirst($lang) .",". strtolower($lang);
111
+    $fileSearch = strtoupper($lang).",".ucfirst($lang).",".strtolower($lang);
112 112
 
113 113
     // UTF-8 BOM starts with EF BB BF
114
-    define ('UTF8_BOM', chr(0xEF) . chr(0xBB) . chr(0xBF));
114
+    define('UTF8_BOM', chr(0xEF).chr(0xBB).chr(0xBF));
115 115
 
116 116
     $regex->rewind();
117
-    while($regex->valid())
117
+    while ($regex->valid())
118 118
     {
119 119
         if (!$regex->isDot())
120 120
         {
121
-            $file = glob($regex->getPathInfo() ."/*{". $fileSearch ."}*.". $fileExt, GLOB_BRACE);
121
+            $file = glob($regex->getPathInfo()."/*{".$fileSearch."}*.".$fileExt, GLOB_BRACE);
122 122
 
123 123
             $isFile = array_filter($file);
124 124
 
@@ -132,13 +132,13 @@  discard block
 block discarded – undo
132 132
                     // But UTF-8 with BOM not!
133 133
                     if ($first3 === UTF8_BOM)
134 134
                     {
135
-                        echo 'Detected <b>UTF-8 BOM</b> in '. $file[0] .'<br>';
135
+                        echo 'Detected <b>UTF-8 BOM</b> in '.$file[0].'<br>';
136 136
                         $allWrongEnc++;
137 137
                     }
138 138
                 } else
139 139
                 // Other encoding
140 140
                 {
141
-                    echo 'Detected <b>other encoding</b> in '. $file[0] .'<br>';
141
+                    echo 'Detected <b>other encoding</b> in '.$file[0].'<br>';
142 142
                     $allWrongEnc++;
143 143
                 }
144 144
             }
Please login to merge, or discard this patch.
config.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
     if (strpos($uname, "linux") !== false)
35 35
     {
36 36
         echo "<br><br>For <b><u>Linux users</u></b>: make sure you have set the right permission rights for both the ReactOS source code directory and the tool directory. Use <i>chmod</i> command and set their rights to <b>755</b> for both these directories if necessary. In any case you're using XAMPP for Linux, change the user and usergroup to yours. To do so read this: <a href='https://askubuntu.com/a/221593'>Change XAMPP's usergroup and username (link)</a>";
37
-    }
38
-    elseif (strpos($uname, "win") !== false)
37
+    } elseif (strpos($uname, "win") !== false)
39 38
     {
40 39
         echo "<br><br>For <b><u>Windows users</u></b>: make sure the ReactOS source code path is <b>CORRECT</b> or that it is not <b>CORRUPT</b>";
41 40
     }
Please login to merge, or discard this patch.