mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 16:46:48 +01:00
Output git diff info if we have it too
This commit is contained in:
@@ -222,5 +222,17 @@ if (!isset($_GET['timestamp']) || !isset($prevIndexData["timestamps"]) || $_GET[
|
||||
];
|
||||
}
|
||||
|
||||
// If we have a data/git-diff.php file
|
||||
if (file_exists($docRoot.$ICEcoderDir."/data/git-diff.php")) {
|
||||
// Get serialized array back out of PHP file inside a comment block as git data for git diff display
|
||||
$gitData = file_get_contents($docRoot.$ICEcoderDir."/data/git-diff.php");
|
||||
if (strpos($gitData, "<?php") !== false) {
|
||||
$gitData = str_replace("<?php\n/*\n\n", "", $gitData);
|
||||
$gitData = str_replace("\n\n*/\n?>", "", $gitData);
|
||||
$gitData = unserialize($gitData);
|
||||
$output["git"] = $gitData;
|
||||
}
|
||||
}
|
||||
|
||||
// Output the JSON
|
||||
echo json_encode($output, JSON_PRETTY_PRINT);
|
||||
|
||||
Reference in New Issue
Block a user