diff --git a/scripts/play.php b/scripts/play.php index 34340af..bf6df3c 100644 --- a/scripts/play.php +++ b/scripts/play.php @@ -325,7 +325,8 @@ if(!isset($_GET['species']) && !isset($_GET['filename'])){ while($results=$result->fetchArray(SQLITE3_ASSOC)) { $name = $results['Com_Name']; - if(realpath($home."/BirdSongs/Extracted/By_Date/".$date."/".str_replace(" ", "_",$name)) !== false){ + $dir_name = str_replace("'", '', $name); + if(realpath($home."/BirdSongs/Extracted/By_Date/".$date."/".str_replace(" ", "_", $dir_name)) !== false){ $birds[] = $name; } } diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php index 02ee33b..f7f3f68 100644 --- a/scripts/todays_detections.php +++ b/scripts/todays_detections.php @@ -192,7 +192,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) { $iterations++; $comname = preg_replace('/ /', '_', $todaytable['Com_Name']); - $comname = preg_replace('/\'/', '_', $comname); + $comname = preg_replace('/\'/', '', $comname); $filename = "/By_Date/".date('Y-m-d')."/".$comname."/".$todaytable['File_Name']; $filename_formatted = $todaytable['Date']."/".$comname."/".$todaytable['File_Name']; $sciname = preg_replace('/ /', '_', $todaytable['Sci_Name']);