diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-12 17:13:12 +0800 |
---|---|---|
committer | <unostar@danalan.info> | 2009-06-12 21:21:02 +0800 |
commit | f578906d33234fea363bb7b893ffe23ae8c81db3 (patch) | |
tree | 4f499dacaf278dd6879cbbc3832a795b6c32d020 | |
parent | 35e5a7d69b04bef171ed30b2f31aad32b83b19f0 (diff) |
Convert the filename to a sensible title to match the way that the simple uploader works.
Signed-off-by: <unostar@danalan.info>
-rw-r--r-- | modules/server_add/helpers/server_add_task.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/server_add/helpers/server_add_task.php b/modules/server_add/helpers/server_add_task.php index 98575915..0482b47c 100644 --- a/modules/server_add/helpers/server_add_task.php +++ b/modules/server_add/helpers/server_add_task.php @@ -56,11 +56,12 @@ class server_add_task_Core { } else { $extension = strtolower(substr(strrchr($name, '.'), 1)); $source_path = "$path{$file['path']}/$name"; + $title = item::convert_filename_to_title($name); if (in_array($extension, array("flv", "mp4"))) { - $movie = movie::create($parent, $source_path, $name, $name, + $movie = movie::create($parent, $source_path, $name, $title, null, user::active()->id); } else { - $photo = photo::create($parent, $source_path, $name, $name, + $photo = photo::create($parent, $source_path, $name, $title, null, user::active()->id); } } |