properly replace quotes

This commit is contained in:
frederik
2024-04-23 19:26:08 +02:00
parent 752ba555a8
commit 1c41fc3d8f
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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;
}
}
+1 -1
View File
@@ -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']);