From 003da6496ac9bd405992609f0890fbc78a515869 Mon Sep 17 00:00:00 2001 From: Adrian Gonzales Date: Fri, 26 May 2017 14:55:25 -0500 Subject: [PATCH] Replace code that was out-of-sync with master fork Former-commit-id: d4f51174f24ab2a2b2fadc1a63f6c214ce7f5681 --- library/StaticHtmlOutput.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/library/StaticHtmlOutput.php b/library/StaticHtmlOutput.php index fddfe6e0..ea24425e 100644 --- a/library/StaticHtmlOutput.php +++ b/library/StaticHtmlOutput.php @@ -283,7 +283,7 @@ class StaticHtmlOutput { $files = scandir($dir); foreach($files as $item){ if($item != '.' && $item != '..'){ - $ContentType = GuessType($item); + $ContentType = GuessMimeType($item); if(is_dir($dir.'/'.$item)) { UploadDirectory($S3, $Bucket, $dir.'/'.$item, $siteroot); } else if(is_file($dir.'/'.$item)) { @@ -301,13 +301,7 @@ class StaticHtmlOutput { } } - /* - * GuessType - - * - * Make a simple guess as to the file's content type, - * and return a MIME type. - */ - function GuessType($File) { + function GuessMimeType($File) { $Info = pathinfo($File, PATHINFO_EXTENSION); switch (strtolower($Info)) { @@ -464,4 +458,4 @@ class StaticHtmlOutput { error_log('response body was empty'); } } -} +} \ No newline at end of file