Fix #34: Correct JSON files by putting first line in another metadata file
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
<?php
|
||||
|
||||
function stripFirstLine($text)
|
||||
{
|
||||
return substr($text, strpos($text, "\n") + 1);
|
||||
}
|
||||
|
||||
if (!function_exists('str_contains')) {
|
||||
function str_contains($haystack, $needle)
|
||||
{
|
||||
@@ -19,8 +14,7 @@
|
||||
$uri = str_replace('/', '#', $uri);
|
||||
$uri = $prefix . $uri;
|
||||
header('Content-Type: application/json; charset=UTF-8');
|
||||
$content = file_get_contents("zip://$uri");
|
||||
echo stripFirstLine($content);
|
||||
echo file_get_contents("zip://$uri");
|
||||
} else {
|
||||
$uri = $prefix . $uri;
|
||||
header("Content-Type: application/zip");
|
||||
|
Reference in New Issue
Block a user