File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,10 @@ function cleanArray($didYouMeans){
178
178
$ FileAll = (new \Nette \PhpGenerator \Extractor (file_get_contents ($ file )))->extractAll ();
179
179
$ code = (new \Nette \PhpGenerator \PsrPrinter )->printFile ($ FileAll );
180
180
181
+ if (isset ($ _SERVER ['HTTP_X_SOURCE_ENCODING ' ]) && 'b64 ' === $ _SERVER ['HTTP_X_SOURCE_ENCODING ' ] ){
182
+ $ code = base64_encode ($ code );
183
+ }
184
+
181
185
header ('Content-Type: text/plain ' );
182
186
183
187
@@ -258,6 +262,10 @@ function cleanArray($didYouMeans){
258
262
$ outPut = file_get_contents ($ file );
259
263
}
260
264
265
+ if (isset ($ _SERVER ['HTTP_X_SOURCE_ENCODING ' ]) && 'b64 ' === $ _SERVER ['HTTP_X_SOURCE_ENCODING ' ] ){
266
+ $ outPut = base64_encode ($ outPut );
267
+ }
268
+
261
269
262
270
header ('Content-Type: text/plain ' );
263
271
You can’t perform that action at this time.
0 commit comments