summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/Legal_File_Helper_Test.php
AgeCommit message (Collapse)Author
2013-03-03#2034 - Add webm and ogv as valid movie types.shadlaws
- added them to legal_file helper - revised unit tests
2013-02-12#2001 - Make filename sanitizing more consistent.shadlaws
- 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...
2013-02-10#2000 - Make legal_file::smash_extensions more robust.shadlaws
- Fixed legal_file::smash_extensions. - Added new unit test. - Removed duplicated condition in existing unit test.
2013-01-28#1945 - Extend legal_file helper functions.shadlaws
- Added get_types_by_extension function, which is a merged version of get...types_by_extension functions (similar to get_extensions). - Added optional extension argument to get...extensions functions similar to get...types_by_extension functions. - Added unit tests. Now, every legal_file function has one. - Restructured helper file to include caches. - Added array_unique to get...types (derived from get...types_by_extension, which can be many-to-one). - Edited server_add, uploader, and item model to use new functionality.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2013-01-20Simplify get_photo_types_by_extension_test and ↵Bharat Mediratta
get_movie_types_by_extension_test.
2013-01-19#1944 - Fix possible warnings in legal_file::get_photo_types_by_extension ↵shadlaws
and legal_file::get_movie_types_by_extension. Added unit tests for these two functions, too.
2013-01-18#1943 - Make legal_file::change_extension more robust.shadlaws
Previously would fail with dots in the directory but no extension. Added unit tests to verify the new change works.
2012-05-17Smash multiple extensions down into a single one when accepting fileBharat Mediratta
uploads. Fixes #1872.
2012-05-13Follow on for #1845 - handle paths with dots in them properly.Bharat Mediratta
2012-05-05Fix extension-swapping code for files that have extensions that areBharat Mediratta
not 3 characters long. Fixes #1845.