From e55d423a858ceefd59fbe3bc05335ac630b74ba7 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Sat, 4 Jun 2022 10:23:56 -0400 Subject: [PATCH] Spectrogram should now work again --- scripts/spectrogram.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/spectrogram.php b/scripts/spectrogram.php index d4ddaaa..6dedc73 100644 --- a/scripts/spectrogram.php +++ b/scripts/spectrogram.php @@ -4,7 +4,7 @@ if(isset($_GET['ajax_csv'])) { $user = shell_exec("awk -F: '/1000/{print $1}' /etc/passwd"); $home = shell_exec("awk -F: '/1000/{print $6}' /etc/passwd"); $home = trim($home); -$files = scandir($home."/BirdSongs/".date('F-Y')."/".date('j-l')."/", SCANDIR_SORT_ASCENDING); +$files = scandir($home."/BirdSongs/".date('F-Y')."/".date('d-l')."/", SCANDIR_SORT_ASCENDING); $newest_file = $files[2]; @@ -15,7 +15,7 @@ if($newest_file == $_GET['newest_file']) { echo "file,".$newest_file."\n"; $row = 1; -if (($handle = fopen($home."/BirdSongs/".date('F-Y')."/".date('j-l')."/".$newest_file.".csv", "r")) !== FALSE) { +if (($handle = fopen($home."/BirdSongs/".date('F-Y')."/".date('d-l')."/".$newest_file.".csv", "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { if($row != 1){ $num = count($data);