Age | Commit message (Collapse) | Author |
|
- 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.
|
|
clause that returns nothing when the album has no album cover - we'll
fail before that if the album's thumbnail is missing, and if it's not
missing then we'll have something to serve even if it's out of date.
|
|
edge case behaviors. It doesn't cover the various headers, but it does cover
the permission based code paths.
|
|
- modified rename_photo_test, rename_album_test, move_album_test, move_photo_test
- unit tests still test file system integrity and pass
|
|
#1941, 1948 - Fix possible warnings in movie and graphics helpers, add functions to convert between seconds and hh:mm:ss.dd (and their unit tests).
|
|
get_movie_types_by_extension_test.
|
|
#1944 - Fix possible warnings in legal_file::get_photo_types_by_extension and legal_file::get_movie_types_by_extension.
|
|
that we can find is git-ignore'd.
|
|
functions to convert between seconds and hh:mm:ss.dd.
Also add unit tests for new movie helper functions.
|
|
and legal_file::get_movie_types_by_extension.
Added unit tests for these two functions, too.
|
|
Previously would fail with dots in the directory but no extension. Added unit tests to verify the new change works.
|
|
|
|
functions more robust when passed an unknown extension. Fixes Item_Model_Test.
|
|
|
|
|
|
more place and update the test.
|
|
uploads. Fixes #1872.
|
|
|
|
not 3 characters long. Fixes #1845.
|
|
|
|
|
|
|
|
|
|
|
|
- Breadcrumb::build_from_item becomes Breadcrumb::array_from_item_parents
- Eliminate Breadcrumb::$id -- it's no longer necessary
- Fold Breadcrumb::generate_show_query_strings into Breadcrumb::array_from_item_parents
- Create Breadcrumb::set_first() and Breadcrumb::set_last()
- Breadcrumb::build_from_list goes away, we just use arrays for this
- Change Search_Controller and Tag_Controller to just create an array
of Breadcrumb instances with the first/last marked appropriately
- Breadcrumb_Test loses a bunch of complexity.
|
|
https://github.com/gallery/gallery3/pull/58/files#r72949.
Create a Breadcrumb library which has two static methods for_item (which takes a an item and builds the entire
breadcrumb for the item) or build (which takes a variable number of Breadcrumb elements and creates a breadcrumb
based on the specified elements).
Used tag->url() to build the tag album url. Escaped the query string for the search. Tightened up the breadcrumb code
in page.html.php.
When adding the show query parameter, we can't blindly concatenate using the ? separator. We have to check that we
use a & if a query parameter already exists.
|
|
|
|
Squashed commit of the following:
commit 945316a8c220b12adb687c896bcc5e86f99f46a4
Author: Chad Parry <github@chad.parry.org>
Date: Thu Jul 21 01:11:13 2011 -0600
Add a test for the sunny-day scenario where a rule changes a data file's MIME type.
commit 4ee1ee000c8f4d8ebaae66f637bc71080486fd73
Author: Chad Parry <github@chad.parry.org>
Date: Thu Jul 21 00:49:47 2011 -0600
Ensure that a third-party cannot swap out a legitimate photo with an unsafe file type.
commit 7dd0105bfc59c150e5640e693778f51bbaa44eab
Author: Chad Parry <github@chad.parry.org>
Date: Thu Jul 21 00:48:19 2011 -0600
Update the MIME type and other meta-data when a new data file is provided.
commit 5a8844c7947b21cf658f22cc61f20ffa9e8f07f2
Author: Chad Parry <github@chad.parry.org>
Date: Thu Jul 21 00:30:01 2011 -0600
Remove a unit test that no longer applies. Replacement data files are allowed to have different MIME types.
commit 0de9c6283ce4f5773cad8e92b6785d6a1f7b5e46
Author: Chad Parry <github@chad.parry.org>
Date: Thu Jul 21 00:27:45 2011 -0600
If one rule fails, then abort processing, rather than trying to proceed to subsequent rules.
commit 41d379c2b777ae7b3a11f528971228e234f8976f
Author: Chad Parry <github@chad.parry.org>
Date: Thu Jul 21 00:10:10 2011 -0600
Replace an overly-complicated regular expression with a simple in_array, at Bharat's suggestion.
commit 1b3f7111d4c2607baaa2da0aab3b501f2d9a1426
Merge: 8f7904a 403f64b
Author: Chad Parry <github@chad.parry.org>
Date: Wed Jul 20 21:02:56 2011 -0600
Merge branch 'master' into rawphoto
commit 8f7904ab62c71a7e4ee68762f936030b4dcb4ea1
Merge: e950573 771de0a
Author: Chad Parry <github@chad.parry.org>
Date: Sat Jun 25 14:12:39 2011 -0600
Merge branches 'master' and 'rawphoto' into rawphoto
commit e95057337996351e49915d9f85d007d50103a4be
Author: Chad Parry <github@chad.parry.org>
Date: Wed Jun 15 20:24:18 2011 -0600
Merge branches 'rawphoto-squash' and 'rawphoto' into rawphoto
|
|
|
|
|