summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-14 00:06:45 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-14 00:06:45 +0000
commit3c78d482e5568745971e2a198000e58651b0ddf5 (patch)
treec4f38025a4b860458ba9c605f6db9ff1ad2b838a /core
parenta149659f33f032c0cebc278689349d0904f8f998 (diff)
Beautify only the title, not the filename
Diffstat (limited to 'core')
-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")));
}