Age | Commit message (Collapse) | Author |
|
--HG--
extra : source : 816294dd5f6fe23160baf9f516e49c66ea8fcb6c
|
|
|
|
accessible.
|
|
|
|
|
|
#2051 - Revise how Gallery_View returns combined JS and CSS.
|
|
- added legal_file::sanitize_dirname(), analogous to sanitize_filename.
- revised item model to use new function when adding or updating an album.
- added some legal_file unit tests.
- revised some item model unit tests.
|
|
Changed Gallery_View's JS and CSS combining to:
- have get_combined() combine all groups if called without arguments.
- ensure the "core" group is combined first.
- always put links where get_combined() is called, even if combining is disabled (otherwise the order isn't preserved).
- add key as cache buster when combining is disabled.
- make "LOOKING FOR YOUR CSS/JAVASCRIPT..." comments in get_combined(), not in the theme itself.
Also, revised xss_data.txt golden file (line number changes only).
|
|
messages.
- disallowed backslashes in item validation.
- refactored the validation logic in the item model a bit.
- added no_backslash error messages in edit album/photo/movie forms.
- fixed error messages in add album forum (some missing, some text different from edit)
- added unit tests
- updated to v58 to correct any existing backslashes in item names
|
|
- removed autocomplete.css/js calls in server_add, tag, and g2_import.
- revised xss_data.txt golden file (line number changes only).
|
|
|
|
the state of the world. These were uncovered when we ran the tests on
Travis which runs the tests in a different order than what I (and
apparently others) use on their dev boxes.
|
|
Update golden file for XSS test.
|
|
#2034 - Add webm and ogv as valid movie types.
|
|
- renamed file with "-flash" to make room for html5 player
- updated item model and xss_data.txt to reflect changes
--HG--
rename : modules/gallery/views/movieplayer.html.php => modules/gallery/views/movieplayer-flash.html.php
|
|
- added them to legal_file helper
- revised unit tests
|
|
- fixed all instances of this in core code
- deleted previous Zend Guard Loader workaround in MY_Kohana.php
- updated Bootstrap.php to reflect deleted MY_Kohana.php
|
|
- added extra $var_subdir argument to item::find_by_path.
- changed item::find_by_path to use $var_subdir to detect if we should look for a jpg-converted item or not (e.g. movie thumbs)
- moved the album thumb detection to item::find_by_path to ensure it knows to look for an exact album match.
- added more sanity checks to item::find_by_path (now has fewer false positive possibilities).
- updated file_proxy to remove the need to guess different movie files.
- updated File_Proxy_Controller - new sanity checks catch previously undetected bug.
- added additional unit tests for item::find_by_path.
|
|
(9345dde83e1f092a9309c45282dc21e3fd408875, d632ef3e50252d388c272cacd29e8cc6e4949cec, fd012276cbf03cc1dc7b8da10aac5cc6f26326c6)
- revised xss_data.txt golden file (no new cases).
- escaped translated string in admin_users.html.php (would have otherwise been a new case in xss_data.txt).
|
|
- added module::get_obsolete_modules_message function
- put message on admin/dashboard
- put message on admin/modules
- put message on upgrader
- updated unit test golden file xss_data
|
|
- unlink copied files because they confused File_Structure_Test
- update golden files
|
|
Added admin/movies screen analogous to the admin/graphics screen so the user can:
- see how FFmpeg is configured (path and version, similar to toolkits in admin/graphics)
- get some instructions on how to install FFmpeg if not found
- change the movie_allow_uploads setting
- ask Gallery to rebuild their movie thumbs
Specifics:
- admin_movies, admin_movies.html (new) - new Movies admin screen
- ffmpeg.png (new) - logo for admin screen
- movie::get_ffmpeg_version (new) - return version number and date of FFmpeg
- form_uploadify.html - change admin message if movie uploads are disabled
- gallery_event::admin_menu - added Movies link to Settings
- xss_data.txt - updated golden file for unit tests
|
|
- 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...
|
|
- Fixed legal_file::smash_extensions.
- Added new unit test.
- Removed duplicated condition in existing unit test.
|
|
unidentifiable/illegal.
- photo & movie helpers: modified to throw exceptions when file is known to be unidentifiable/illegal.
- item model: revised to work with exceptions and be more explicit when the data file is invalid.
- item model: removed duplicate get_file_metadata call for updated items.
- admin_watermarks controller: revised to work with exceptions (really cleans up logic here).
- graphics helper: revised to handle invalid placeholders (a nearly-impossible corner case, but still...).
- photo & movie helper tests: revised to work with exceptions, added new tests for illegal files with valid extensions.
- item model tests: revised to work with exceptions, added new tests for illegal files with valid extensions.
|
|
- Add extra condition to Item_Model_Test::urls_test to test cache busters of missing files.
- Previous commit fixes unit test for empty album url, but now no test checks missing files.
|
|
Follow-on to f83ed5f8716663a45c9d8e8118bbcf0e2849c3fb for #1982.
|
|
- Update xss_test golden file (change line numbers).
|
|
- Fix unit test for album url since empty albums now have thumbnails.
|
|
- Added missing_album_cover.jpg placeholder image.
- Modified the graphics helper to use it. Calling graphics::generate will copy it.
- Modified item::remove_album_cover and gallery_event::item_created to run graphics::generate.
- Added unit test to Graphics_Helper_Test.
|
|
- Added stanza to Item_Model::save that handles when cover id is null.
- Added logic to graphics::generate to copy/convert album cover thumbs from their item thumbs to ensure they're always jpg, and eliminate the possibility that we copy/convert a dirty thumb.
- Redirected other places in code where we want to do one of the above two things to use these two functions instead (gallery_event::item_updated_data_file, item::make_album_cover, item::remove_album_cover).
- Improved validation in Item_Model so only albums can have covers and all covers must be non-albums.
- Added unit tests to Graphics_Helper_Test.
|
|
- Made missing_photo match the image format (jpg, png, etc.).
- Swapped missing_photo.png for missing_photo.jpg since it's likely to require less conversion to match.
- Improved error messages to user when things go wrong.
- Ensured that missing image placeholders are always copied when there's an error.
- Ensured we don't mistake no file output for a correct file output (delete target before attempt).
- Restructured graphics::generate a bit to work better with above changes.
- Added unit tests for graphics::generate.
|
|
- 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.
|
|
- Set the sort_column of the parent album to id, which has no possibility of being identical between the two photos.
- Now, the reweighting will reverse the order even if they were created during the same second.
|
|
conflict-finding code check filenames with no extensions
- Reduced from four places that alter names/slugs to two (one to populate empty slugs, one to handle conflicting names/slugs).
- For empty slugs, fill with generic human-readable name (e.g. "photo") instead of random value.
- For conflicting names/slugs, add suffix that's sequential (e.g. "-01"), only using random after 99 conflicts.
- Made conflict-finding code check filenames with no extensions.
- Renamed _randomize_name_or_slug_on_conflict to _check_and_fix_conflicts.
- Added unit tests. Also cleaned up existing unit tests to reflect new logic and removed a redundant test.
- Added installer logic to correct existing items now considered in conflict.
- Revised gallery_task to look for duplicate names based on new criteria.
|
|
#1965 - Improve sanity checks and copy/convert/process logic for rotate and resize
|
|
- added photo_get_file_metadata and movie_get_file_metadata events
- modified photo::get_file_metadata and movie::get_file_metadata to use them
- ensure that non-readable files throw exceptions
- redirected other photo metadata calls in core to photo::get_file_metadata (the helper function already exists, but in many places getimagesize is still called directly)
- added some unit tests (neither of the functions above had one)
|
|
resize.
- resize: ensured that resize is skipped *only* if the metadata is valid or the options are well-defined and would upscale. Then, if resize is skipped, check to see if it still needs to be converted. Previous conditions would allow a small PNG to get copied to a JPG, and would allow a corrupted JPG to be copied to the output.
- rotate: add checks for empty file or empty options.
- use get_file_metadata instead of direct getimagesize call.
- add unit tests for rotate and resize, including some for corrupted input files and missing options.
|
|
In MySQL queries, _ and % characters are treated as wildcards (similar to ? and *, respectively).
- Added escape_for_like function to MY_Database.php
- Added unit test to Database_Test
- Corrected the five unescaped instances in the code using this function.
|
|
#1955 - Make unit test photos unique.
|
|
- Added test::random_unique_photo and test::random_unique_photo_unsaved to uniquify test photos.
- Uniquified the black dot of test.jpg by coloring it with the six-digit hex code already used to name the random photos (e.g. "name_a48801.jpg").
- Modified four tests in Item_Model_Test that check photo file contents to use new functions to guarantee uniqueness.
|
|
- Added no_extra_spaces_at_end_of_line_test to File_Structure_Test.
- Updated Gallery_Filters to exclude testing code that isn't ours.
- Removed existing extra spaces. New test now passes.
|
|
item::reweight_all_children as an API and write a test for it. Work
in progress on #1914.
|
|
data_rest responses, and check cache validity. Fixes #1909.
|
|
"_test" and
fixing it in 9ba9f3953132c5c5de9efb0a4724c7b9300dc9ea I decided to write a test to make
sure that we don't have any other overlooked tests. We don't.
|
|
|
|
|
|
array
representation of Item_Model. Fixes #1903.
|
|
|
|
#1950 - Replace bogus file overwrites from item model unit test.
|