summaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
2013-01-26#1946, 1947 - Make altered names/slugs more user-friendly, make ↵shadlaws
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.
2013-01-25Merge pull request #103 from shadlaws/fix_1965Bharat Mediratta
#1965 - Improve sanity checks and copy/convert/process logic for rotate and resize
2013-01-26#1951 - Make metadata generation more flexible (photo and movie helpers).shadlaws
- 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)
2013-01-25#1965 - Improve sanity checks and copy/convert/process logic for rotate and ↵shadlaws
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.
2013-01-25Fix an assignment-instead-of-comparison bug. I wish PHP had a betterBharat Mediratta
warning system for this stuff. In this case it's innocuous because the UI only allows you to rearrange stuff inside a single album, so the assignment doesn't do anything. Fixes #1914.
2013-01-25#1956 - Escape LIKE queries (for _ and %).shadlaws
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.
2013-01-24Follow-on to b50768142745dc4bfd8a9460c7490ddd00e3b06a - add a defaultBharat Mediratta
value for lock_timeout so that folks who get the latest code but don't run the upgrader don't get burned by a SQL error.
2013-01-24Merge branch 'master' of github.com:gallery/gallery3Bharat Mediratta
2013-01-24If profiling is enabled, dump out profiling data instead of proxiedBharat Mediratta
images so that we can see how efficient our proxying is. Follow-on for #1959.
2013-01-24Add back a comment that I accidentally removed in the last commit.Bharat Mediratta
2013-01-24Merge pull request #99 from shadlaws/fix_1955Bharat Mediratta
#1955 - Make unit test photos unique.
2013-01-24#1955 - Make unit test photos unique.shadlaws
- 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.
2013-01-24#1960 - Add unit test to look for extra spaces at end of lineshadlaws
- 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.
2013-01-23Extract reweighting logic out of Organize_Controller intoBharat Mediratta
item::reweight_all_children as an API and write a test for it. Work in progress on #1914.
2013-01-23Add a cache buster to all data_rest urls, add caching headers to allBharat Mediratta
data_rest responses, and check cache validity. Fixes #1909.
2013-01-23After finding a test in Item_Model_Test that didn't end in the string ↵Bharat Mediratta
"_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.
2013-01-23Fix comment typo.Bharat Mediratta
2013-01-23Update golden files after 80d6a895edb1cfc3dd0bcacd0d2c63b40c04670cBharat Mediratta
2013-01-23Add a "can_add" permission bit similar to the "can_edit" bit to the RESTful ↵Bharat Mediratta
array representation of Item_Model. Fixes #1903.
2013-01-23Merge branch 'master' of github.com:gallery/gallery3Bharat Mediratta
2013-01-23Enable the profiler and debug output if var/PROFILE exists. ThisBharat Mediratta
provides a quick/easy way for server admins to provide profile output. Fixes #1959.
2013-01-23Merge pull request #97 from mikeage/organize_tag2Bharat Mediratta
Add batch tagging via the organize module
2013-01-23 #1952 Add bulk tagging to the Organize module.Mike Miller
Allow a user to highlight one or more items (images, videos, or albums), and enter a tag (or tags, comma delimited) and apply it to all of the selected items. The code is based on the batchtag module. If the tags module is not enabled, no changes to the Organize UI will be shown.
2013-01-23Use the thumb proportion from the first item in an album if the album has ↵Bharat Mediratta
children. Fixes #1958.
2013-01-22Merge pull request #98 from shadlaws/fix_1954Bharat Mediratta
#1954 - Skip buffer calls for unit tests of file_proxy and data_rest.
2013-01-22gallery.menalto.com -> galleryproject.orgBharat Mediratta
codex.gallery2.org -> codex.galleryproject.org Fixes #1957.
2013-01-21#1954 - Skip buffer calls for unit tests of file_proxy and data_rest.shadlaws
Moved the "if (TEST_MODE)" statement before the buffer calls in file_proxy and data_rest. This has no impact on normal use, but will make the unit tests more compatible with different server/PHP configurations. Note: We do not have to skip setting the headers, which means we can build unit tests around them if we wish.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2013-01-20Merge pull request #95 from shadlaws/fix_1950Bharat Mediratta
#1950 - Replace bogus file overwrites from item model unit test.
2013-01-21Add unit tests for data_rest. While I'm in there, get rid of theBharat Mediratta
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.
2013-01-20Add a long overdue test for File_Proxy_Controller that tests all the variousBharat Mediratta
edge case behaviors. It doesn't cover the various headers, but it does cover the permission based code paths.
2013-01-20#1950 - Replace bogus file overwrites from item model unit test.shadlaws
- modified rename_photo_test, rename_album_test, move_album_test, move_photo_test - unit tests still test file system integrity and pass
2013-01-20#1949 - Fix album thumb mime types given by data_rest and file_proxyshadlaws
Correct result: always "image/jpeg" Old data_rest result: mime of cover item Old file_proxy result: mime of album item (null)
2013-01-19Merge pull request #89 from shadlaws/fix_1942Bharat Mediratta
#1942 - Make data_rest and file_proxy more consistent
2013-01-19Merge pull request #88 from shadlaws/fix_1941Bharat Mediratta
#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).
2013-01-20Simplify get_photo_types_by_extension_test and ↵Bharat Mediratta
get_movie_types_by_extension_test.
2013-01-19Merge pull request #93 from shadlaws/fix_1944Bharat Mediratta
#1944 - Fix possible warnings in legal_file::get_photo_types_by_extension and legal_file::get_movie_types_by_extension.
2013-01-20Change the logic for finding controllers to use glob() but drop anythingBharat Mediratta
that we can find is git-ignore'd.
2013-01-19#1942 - Make data_rest and file_proxy more consistent - several minor ↵shadlaws
documentation/formatting changes. No actual functionality changed here.
2013-01-19#1941, 1948 - Fix possible warnings in movie and graphics helpers, add ↵shadlaws
functions to convert between seconds and hh:mm:ss.dd. Also add unit tests for new movie helper functions.
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.
2013-01-17Update golden files.Bharat Mediratta
2013-01-17Follow-on to 94b26e506c339f50b8d094057bffc1877a79afa9 - make the new legal_fileBharat Mediratta
functions more robust when passed an unknown extension. Fixes Item_Model_Test.
2013-01-14Fix up some indentation.Bharat Mediratta
2013-01-13Tags by name (includes a G2 mapping)Mike Miller
2013-01-01#1919 - change `convert -v` to `convert -version`shadlaws
2012-12-30#1931, #1932, #1933, #1934 - movieplayer view and movie_img function in ↵shadlaws
items model Many changes to movieplayer view and movie_img function in items model: - include control bar height when dimensioning movie player - provide a default "guess" at height and width when they are set as zero in items table - resize movie player once the video is loaded based on its actual metadata - add get_movie_img event to provide flexibility for altering/replacing the default Flowplayer v3 --HG-- extra : rebase_source : 5d1e9bb66ebf3e3fed5e1b9ee63790a204f21450
2012-12-20Merge pull request #74 from mikemayer67/masterBharat Mediratta
Correction of event sent from Users_Controller::_get_change_email_form Fixes #1930
2012-12-18Check for "add" instead of "edit" in item_rest::post. Fixes #1929.Bharat Mediratta