summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/controllers/simple_uploader.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/controllers/simple_uploader.php b/core/controllers/simple_uploader.php
index 60da13c0..bdf9582f 100644
--- a/core/controllers/simple_uploader.php
+++ b/core/controllers/simple_uploader.php
@@ -47,16 +47,16 @@ class Simple_Uploader_Controller extends Controller {
$temp_filename = upload::save("Filedata");
try {
- $title = substr(basename($temp_filename), 10); // Skip unique identifier Kohana adds
- $title = $this->convert_filename_to_title($title);
+ $name = substr(basename($temp_filename), 10); // Skip unique identifier Kohana adds
+ $title = $this->convert_filename_to_title($name);
$path_info = pathinfo($temp_filename);
if (array_key_exists("extension", $path_info) &&
in_array(strtolower($path_info["extension"]), array("flv", "mp4"))) {
- $movie = movie::create($album, $temp_filename, $title, $title);
+ $movie = movie::create($album, $temp_filename, $name, $title);
log::success("content", t("Added a movie"),
html::anchor("movies/$movie->id", t("view movie")));
} else {
- $photo = photo::create($album, $temp_filename, $title, $title);
+ $photo = photo::create($album, $temp_filename, $name, $title);
log::success("content", t("Added a photo"),
html::anchor("photos/$photo->id", t("view photo")));
}