summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/quick.php
diff options
context:
space:
mode:
authorChad Parry <github@chad.parry.org>2011-04-23 21:19:47 -0600
committerChad Parry <github@chad.parry.org>2011-04-30 17:45:44 -0600
commit5c9a3b3f39f6ff0d5c84c2cf283d27eaebe2e66e (patch)
treec60dd8a696ba3bc3142f86e01a4464d526a2ee1f /modules/gallery/controllers/quick.php
parent97400b78153620262120868b37545170416413c9 (diff)
Create a tempnam substitute that safely creates files with a given extension.
Diffstat (limited to 'modules/gallery/controllers/quick.php')
-rw-r--r--modules/gallery/controllers/quick.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php
index da4768fd..ce52cb8d 100644
--- a/modules/gallery/controllers/quick.php
+++ b/modules/gallery/controllers/quick.php
@@ -36,8 +36,8 @@ class Quick_Controller extends Controller {
}
if ($degrees) {
- $tmpfile = tempnam(TMPPATH, "rotate") . "." .
- pathinfo($item->file_path(), PATHINFO_EXTENSION);
+ $tmpfile = system::tempnam(TMPPATH, "rotate",
+ "." . pathinfo($item->file_path(), PATHINFO_EXTENSION));
gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees), $item);
$item->set_data_file($tmpfile);
$item->save();