From 73bd2a4e2c675d17b259eeaac9954dc55da0ce5e Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Mon, 6 Mar 2023 17:37:54 -0500 Subject: [PATCH] Fixing colorize bugs - it works now! --- homepage/views.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homepage/views.php b/homepage/views.php index 16e02b5..1bbd688 100644 --- a/homepage/views.php +++ b/homepage/views.php @@ -324,9 +324,9 @@ if(isset($_GET['view'])){ $diff_array = str_split($diff); $indicators = array_map(function ($d) use ($delta) { if ($d === '+') { - return 'A'; + return "+"; } elseif ($d === '-') { - return 'B'; + return "-"; } elseif ($d === ' ') { if ($delta !== '') { return 'A'; @@ -342,13 +342,13 @@ if(isset($_GET['view'])){ // rejoin the modified lines into a string $output = implode("\n", $lines); - $results = $lines; + $results = $output; if(strlen($results) == 0) { $results = "This command has no output."; } - echo "
Output of command:`".$initcommand."`
$results
"; + echo "
Output of command:`".$initcommand."`
$results
"; } else { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized');