From 02c8f7d3b94aa22138b503dbe0b7a60317181059 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 15 Oct 2019 22:23:23 +0100 Subject: [PATCH] Get git content data via indexer --- lib/indexer.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/indexer.php b/lib/indexer.php index f87f829..d3056f3 100644 --- a/lib/indexer.php +++ b/lib/indexer.php @@ -216,7 +216,19 @@ if (!isset($_GET['timestamp']) || !isset($prevIndexData["timestamps"]) || $_GET[ $output["gitDiff"] = $gitDiffData; } } - + + // If we have a data/git-content.php file + if (file_exists($docRoot.$ICEcoderDir."/data/git-content.php")) { + // Get serialized array back out of PHP file inside a comment block as git data for git content usage + $gitContent = file_get_contents($docRoot.$ICEcoderDir."/data/git-content.php"); + if (strpos($gitContent, "", "", $gitContent); + $gitContent = unserialize($gitContent); + $output["gitContent"] = $gitContent; + } + } + // Store the serialized array in PHP comment block for next time file_put_contents($docRoot.$ICEcoderDir."/data/index.php", ""); // Output what we have in our index...