From a03cf9ea437dcb569260b79086d53c744a0a1fe0 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 6 Oct 2019 12:24:20 +0100 Subject: [PATCH] Output git diff info if we have it too --- lib/indexer.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/indexer.php b/lib/indexer.php index e139077..8e69a98 100644 --- a/lib/indexer.php +++ b/lib/indexer.php @@ -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, "", "", $gitData); + $gitData = unserialize($gitData); + $output["git"] = $gitData; + } +} + // Output the JSON echo json_encode($output, JSON_PRETTY_PRINT);