summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/uploader.php
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-02-12 00:37:33 +0100
committershadlaws <shad@shadlaws.com>2013-02-12 00:37:33 +0100
commitd04a6fc87d96b70ab0f70414f2ff40d1f1e7f482 (patch)
treebe8544a882e6221fb0b376d2c4dd8201273e4053 /modules/gallery/controllers/uploader.php
parente109f0b5113c1f8b33130866af44450ca4107ed4 (diff)
#2001 - Make filename sanitizing more consistent.
- legal_file - added sanitize_filname() to sanitize photo/movie filenames. - admin_watermarks - revised add() to use new function. - item model - added _process_data_file_info() to validate the data file, get its metadata, and sanitize the item name. - item model - revised save() for new items to use _process_data_file_info *before* the slug is checked. - item model - revised save() for updated items to use _process_data_file_info. - item model - revised save() for updated items to sanitize name if changed. - uploader - removed call to smash_extensions (item model does this when it calls sanitize_filename). - Legal_File_Helper_Test - added unit tests for sanitize_filename. - Item_Model_Test - revised existing unit tests based on changes. - Item_Model_Test - added new unit tests for names with legal but incorrect extensions. - Averted take over by HAL with fix #2001...
Diffstat (limited to 'modules/gallery/controllers/uploader.php')
-rw-r--r--modules/gallery/controllers/uploader.php4
1 files changed, 0 insertions, 4 deletions
diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php
index 55c65c95..78437071 100644
--- a/modules/gallery/controllers/uploader.php
+++ b/modules/gallery/controllers/uploader.php
@@ -63,10 +63,6 @@ class Uploader_Controller extends Controller {
$item->parent_id = $album->id;
$item->set_data_file($temp_filename);
- // Remove double extensions from the filename - they'll be disallowed in the model but if
- // we don't do it here then it'll result in a failed upload.
- $item->name = legal_file::smash_extensions($item->name);
-
$path_info = @pathinfo($temp_filename);
if (array_key_exists("extension", $path_info) &&
legal_file::get_movie_extensions($path_info["extension"])) {