summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
AgeCommit message (Collapse)Author
2013-01-26#1966 - "Fix your Gallery" shows 60/59 items completed.shadlaws
- Fixed counter in gallery_task::fix that was often one too many. For FIX_STATE_RUN_MISSING_ACCESS_CACHES, changed this: $stack = explode(" ", $task->get("stack")); To this: $stack = array_filter(explode(" ", $task->get("stack")));
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-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-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-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-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-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-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-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-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-01#1919 - change `convert -v` to `convert -version`shadlaws
2012-12-18Check for "add" instead of "edit" in item_rest::post. Fixes #1929.Bharat Mediratta
2012-12-18[#1928 - Make thumbnail generation more flexible for movies (graphics and ↵shadlaws
movie helpers)] - graphics helper: add movie_extract_frame event to generate function (allows modules to add to the options sent to movie::extract_frame or to generate the thumbnail on their own without movie::extract_frame) - movie helper: add extra optional argument to movie::extract_frame (can add ffmpeg arguments and/or change the frame extract time) - gallery_installer: add movie_extract_time module variable, update to v53 - module.info: update to v53 - install.sql: update to v53
2012-12-16[#1924, #1925, #1927 - enhance compatibility with movies (movie helper) and ↵shadlaws
file types (legal_file helper)] bug fix: modify movie.php helper to take DAR (display aspect ratio) into account in get_file_metadata bug fix / enhancement: add duration to get_file_metadata output bug fix: modify movie.php helper to use correct resolution and duration from get_file_metadata in extract_frame bug fix: modify movie.php helper to be more robust against ffmpeg failures and limitations, including adding "-threads 1" argument if needed enhancement: modified to include ordered maps of extensions to MIME types (get_photo_types_by_extension and get_movie_types_by_extension functions), modified get_file_metadata in movie and photo helpers to use them gallery_installer, module.info, install.sql: updated to v52 with m4v mime correction code (was video/mp4)
2012-12-09Eliminate the search context if we encounter an item that cannot beBharat Mediratta
found in the search results. Fixes #1923.
2012-11-13[#1907] Added code needed for the case when a user upgrades.chalbertgit
2012-09-28Add locale for Thai. Fixes #1916.Bharat Mediratta
2012-07-21Rename any files that have two dots in them to a legal name. ThisBharat Mediratta
fixes the bug where we made those files invalid in 3.0.4 without providing a clean upgrade path. Bump gallery module to 50. Fixes
2012-07-21Refill the path and url caches in the item model at the end of this task. ↵Bharat Mediratta
Fixes #1896.
2012-07-21Fix comment typo.Bharat Mediratta
2012-07-21Fix the access_cache rebuilding code to not load all missing access caches ↵Bharat Mediratta
into the stack, if you're missing enough it'll blow the stack (like, if you truncate the access_caches table). Fixes #1895.
2012-06-11Rename the comparator to something that makes more sense (to me), and make ↵Bharat Mediratta
it static. Follow-on to 5d9e71741754809ebe5f543eb874634e6fc8cc9d for #1859.
2012-05-19Remove accidental double encoding.Bharat Mediratta
2012-05-19Create an ajax response framework that inserts <meta> tags to guardBharat Mediratta
against UTF-7, and create a $.gallery_autocomplete variant of jQuery's autocomplete that expects the first line to be a <meta> tag and discards it. More complete fix for #1871.
2012-05-17Smash multiple extensions down into a single one when accepting fileBharat Mediratta
uploads. Fixes #1872.
2012-05-15Don't allow new albums with a slug that matches a controller - put up aBharat Mediratta
message telling the user that it's a reserved address. Partial fix for #95.
2012-05-13Follow on for #1845 - handle paths with dots in them properly.Bharat Mediratta
2012-05-11Sort modules by visible name, not id. Fixes #1859.Bharat Mediratta
2012-05-07Convert the missing movie placeholder over to a JPG for consistency. Fixes ↵Bharat Mediratta
#1828.
2012-05-07Fix typo in call to Kohana_Exception::getMessage, thanks to Serge.Bharat Mediratta
Fixes #1780.
2012-05-07Fix missing date.timezone which results in a crash on startup in I18nBharat Mediratta
code. Fill in missing field and log it 25% of the time. Fixes #1853.
2012-05-06Use html::anchor consistently. Fixes #1851.Bharat Mediratta
2012-05-05Fix extension-swapping code for files that have extensions that areBharat Mediratta
not 3 characters long. Fixes #1845.
2012-05-05Improve the dimensions-detecting regex, thanks to cchiappa.Bharat Mediratta
Fixes #1844.
2012-04-01"public static" -> "static"Bharat Mediratta
2012-04-01Beef up the random number generator by using Joomla's new implementation.Bharat Mediratta