Skip to content

Commit

Permalink
Fixing apostrophes and quotes in titles
Browse files Browse the repository at this point in the history
  • Loading branch information
msaperst committed Jun 29, 2024
1 parent 322bef9 commit 2ad79dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/api/download-selected-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@
if (!is_dir("../tmp/")) {
mkdir("../tmp/");
}
$myFile = "../tmp/{$album->getName()} " . date("Y-m-d H-i-s") . ".zip";
$name = str_replace('"', "", $album->getName());
$name = str_replace("'", "", $name);
$myFile = "../tmp/$name " . date("Y-m-d H-i-s") . ".zip";
if (count($image_array) > 100) {
system("zip -j '$myFile' $images > /dev/null 2>&1 &");
$response ['message'] = "Due to the large number of images, this download will take a while. " .
Expand Down
2 changes: 2 additions & 0 deletions public/api/download-send-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
exit();
}

$file = str_replace('"', "", $file);
$file = str_replace("'", "", $file);
system("bash -c 'sleep 300; php -f ../../bin/send-download-email.php $email \"$file\";' > /dev/null 2>&1 &");

0 comments on commit 2ad79dc

Please sign in to comment.