Przeglądaj źródła

Reset directory and add extension

Alan Lam 8 lat temu
rodzic
commit
5fd44f24ae
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      controllers/performance_presentation.php

+ 3 - 1
controllers/performance_presentation.php

@@ -50,7 +50,9 @@ foreach($charts_b64 as $index => $b64) {
 
 	list($ignore, $png_b64) = explode("base64,", $b64);
 
-	$name = tempnam("./", "ppt");
+	$name = tempnam("/tmp", "ppt");
+	$name .= ".png";
+
 	$handle = fopen($name, "w");
 	fwrite($handle, base64_decode($png_b64));