1
0

Use the system::tempnam substitute so that extensions are handled safely.

This commit is contained in:
Chad Parry 2011-04-23 21:20:47 -06:00
parent 078d81a5f1
commit c39fc9a7ff

View File

@ -21,7 +21,7 @@ class rawphoto_event_Core {
static function item_created($item) {
if ($item->is_photo()) {
$input_file = $item->file_path();
$output_file = tempnam(TMPPATH, "rawphoto-") . ".jpg";
$output_file = system::tempnam(TMPPATH, "rawphoto-", ".jpg");
$success = rawphoto_graphics::convert($input_file, $output_file);
if ($success) {
$item->set_data_file($output_file);