Age | Commit message (Collapse) | Author |
|
- Fixed legal_file::smash_extensions.
- Added new unit test.
- Removed duplicated condition in existing unit test.
|
|
#1997 - Correct movie dimensions and mime type improperly set by contributed modules.
|
|
#1996 - Add blacklist to legal_file helper.
|
|
#1994 - Make get_file_metadata throw an exception if photo or movie is unidentifiable/illegal.
|
|
- Added code to check/correct movie width, height, and mime in graphics::generate.
As the comment says in the commit, this isn't ideal, but doing it in an upgrade
script wouldn't be very ideal either.
|
|
Adding a blacklist to legal_file could prevent possible security holes arising
from a contributed module that adds file types by user input (e.g. an admin screen).
|
|
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.
|
|
errors.
- Changed redirect if it finished without failures.
- No change to Upgrader_Controller::index(), since its behavior with an empty vs. undefined failed query is identical.
|
|
|
|
Don't try to use an array index on a function return, that's not supported
in PHP 5.3
|
|
Documentation-only changes to examples used in:
- Item_Model::url
- Item_Model::abs_url
- Item_Model::file_path
- Item_Model::file_url
- Item_Model::resize_path
- Item_Model::resize_url
- Item_Model::thumb_path
- Item_Model::thumb_url
|
|
#1991 - Add options to graphics::mark_dirty to specify type and/or mime type
|
|
- graphics::mark_dirty - added $type and $mime_type as options.
- graphics::mark_dirty - used options to set additional where conditions.
|
|
- 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.
|
|
|
|
combining CSS/JS
by touching var/DONT_COMBINE. Fixes #1989.
|
|
- Update xss_test golden file (change line numbers).
|
|
- Fix unit test for album url since empty albums now have thumbnails.
|
|
As the g2_import process is generally assumed to be permanent, the
redirect should be a 301, and not a 302.
|
|
|
|
was breaking all unit tests. Use module::install("gallery") instead
of calling gallery_installer::install directly.
|
|
version. It's redundant. Fixes #1985.
|
|
#1982 - Add placeholder for albums with no album cover.
|
|
|
|
#1983: Remove item keys changed for/by graphics::generate from significant changes list.
|
|
changes list.
There's no need to run through all of the item save/validation logic for these
entries, which are changed frequently during the course of thumb/resize generation.
|
|
- 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.
|
|
Previously skipped admin_watermarks mods to use new functionality of #1945
since there was concurrent work on it with #1970.
Now that both are done, we can wrap this up.
|
|
Restrict which album cover ids we swap over to the hierarchy of the
current album, otherwise we can wind up in sticky situations with
hierarchical album cover chains.
Eg, you have a hierarchy like this:
root -> A1 -> A2 --> A3 -> P1
A4 -> P2
P1 is the album cover for its entire hierarchy. But then you
swap A2's album cover for A3 making this:
root -> A1 -> A2 + A3 -> P1
\-> A4 -> P2
Since A1, A2 and A3 all had P1 as their album cover item id. Now
we're swapping it over to P2 but we want to leave P1 as A3's album
cover item id. So only look at A4's hierarchy and ignore its peers.
|
|
|
|
album cover. Fixes #1979.
|
|
using the old item as their album cover. Fixes #1978.
|
|
#1968 - Improve album cover generation/removal/etc.
|
|
Create a siblings() function which pulls together the siblings_callback
function and makes it a more palatable API.
|
|
watermark.name setting to something terrible by accident via Admin >
Advanced, we'll just use the basename. Fixes #1977.
|
|
|
|
containing a callback that returns all the siblings. Fixes #1975.
|
|
#1973 Handle redirected G2 URLs for tags, including g2_itemId passed
|
|
|
|
- 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.
|
|
#1970 - Make add watermarks more secure and add unit tests.
|
|
This follows #1855 and #1951...
- Ensured that invalid or illegal files are not added even if they have valid extensions.
- Added unit tests (currently there aren't any...)
|
|
- 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.
|
|
#1945 - Extend legal_file helper functions.
|
|
#1969 - Give graphics events the ability to override the standard process
|
|
- 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.
|