Commit Graph

4526 Commits

Author SHA1 Message Date
Bharat Mediratta
e8b7e155d5 Follow-on to b507681427 - add a default
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-24 23:48:07 -05:00
Bharat Mediratta
0353578630 Merge branch 'master' of github.com:gallery/gallery3 2013-01-24 18:14:28 -05:00
Bharat Mediratta
86a2759062 If profiling is enabled, dump out profiling data instead of proxied
images so that we can see how efficient our proxying is.  Follow-on
for #1959.
2013-01-24 18:14:14 -05:00
Bharat Mediratta
727a595447 Add back a comment that I accidentally removed in the last commit. 2013-01-24 18:13:26 -05:00
Bharat Mediratta
6830ac4542 Merge pull request #99 from shadlaws/fix_1955
#1955 - Make unit test photos unique.
2013-01-24 12:46:26 -08:00
shadlaws
126727b4f2 #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.
2013-01-24 15:56:13 +01:00
shadlaws
031dd3bd6f #1960 - Add unit test to look for extra spaces at end of line
- 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-24 12:03:05 +01:00
Bharat Mediratta
aa8fffcd8f Extract reweighting logic out of Organize_Controller into
item::reweight_all_children as an API and write a test for it.  Work
in progress on #1914.
2013-01-23 21:33:19 -05:00
Bharat Mediratta
34198e71d3 Add a cache buster to all data_rest urls, add caching headers to all
data_rest responses, and check cache validity.  Fixes #1909.
2013-01-23 20:50:54 -05:00
Bharat Mediratta
cc926cb9e1 After finding a test in Item_Model_Test that didn't end in the string "_test" and
fixing it in 9ba9f39531 I decided to write a test to make
sure that we don't have any other overlooked tests.  We don't.
2013-01-23 18:58:37 -05:00
Bharat Mediratta
bc5dbd812a Fix comment typo. 2013-01-23 18:56:30 -05:00
Bharat Mediratta
e6783b7aa7 Update golden files after 80d6a895ed 2013-01-23 18:28:28 -05:00
Bharat Mediratta
9ba9f39531 Add a "can_add" permission bit similar to the "can_edit" bit to the RESTful array
representation of Item_Model.  Fixes #1903.
2013-01-23 18:24:31 -05:00
Bharat Mediratta
1d700bf665 Merge branch 'master' of github.com:gallery/gallery3 2013-01-23 18:06:50 -05:00
Bharat Mediratta
a1a6600457 Enable the profiler and debug output if var/PROFILE exists. This
provides a quick/easy way for server admins to provide profile output.
Fixes #1959.
2013-01-23 18:03:09 -05:00
Bharat Mediratta
937102e888 Merge pull request #97 from mikeage/organize_tag2
Add batch tagging via the organize module
2013-01-23 14:07:59 -08:00
Mike Miller
80d6a895ed #1952 Add bulk tagging to the Organize module.
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-23 22:58:45 +02:00
Bharat Mediratta
eefc9d5553 Use the thumb proportion from the first item in an album if the album has children. Fixes #1958. 2013-01-23 14:03:44 -05:00
Bharat Mediratta
e8302ffce5 Merge pull request #98 from shadlaws/fix_1954
#1954 - Skip buffer calls for unit tests of file_proxy and data_rest.
2013-01-22 17:57:58 -08:00
Bharat Mediratta
49f6ce2d94 gallery.menalto.com -> galleryproject.org
codex.gallery2.org -> codex.galleryproject.org

Fixes #1957.
2013-01-22 18:39:24 -05:00
shadlaws
8436e16b2f #1954 - Skip buffer calls for unit tests of file_proxy and data_rest.
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-21 10:45:34 +01:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
61eebe13c9 Merge pull request #95 from shadlaws/fix_1950
#1950 - Replace bogus file overwrites from item model unit test.
2013-01-20 22:06:12 -08:00
Bharat Mediratta
8dc34dade8 Add unit tests for data_rest. While I'm in there, get rid of the
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-21 00:52:52 -05:00
Bharat Mediratta
f1d2a8e871 Add a long overdue test for File_Proxy_Controller that tests all the various
edge case behaviors.  It doesn't cover the various headers, but it does cover
the permission based code paths.
2013-01-20 23:54:01 -05:00
shadlaws
14b02a5b12 #1950 - Replace bogus file overwrites from item model unit test.
- 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 10:01:41 +01:00
shadlaws
1927dd00e4 #1949 - Fix album thumb mime types given by data_rest and file_proxy
Correct result: always "image/jpeg"
Old data_rest result: mime of cover item
Old file_proxy result: mime of album item (null)
2013-01-20 08:34:12 +01:00
Bharat Mediratta
52ab0e9988 Merge pull request #89 from shadlaws/fix_1942
#1942 - Make data_rest and file_proxy more consistent
2013-01-19 22:26:34 -08:00
Bharat Mediratta
f215a417f1 Merge pull request #88 from shadlaws/fix_1941
#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 21:41:45 -08:00
Bharat Mediratta
a06abe32b0 Simplify get_photo_types_by_extension_test and get_movie_types_by_extension_test. 2013-01-20 00:39:58 -05:00
Bharat Mediratta
35bb5c4a1c Merge pull request #93 from shadlaws/fix_1944
#1944 - Fix possible warnings in legal_file::get_photo_types_by_extension and legal_file::get_movie_types_by_extension.
2013-01-19 21:34:39 -08:00
Bharat Mediratta
3a71813f35 Change the logic for finding controllers to use glob() but drop anything
that we can find is git-ignore'd.
2013-01-20 00:24:08 -05:00
shadlaws
592eff0e5a #1942 - Make data_rest and file_proxy more consistent - several minor documentation/formatting changes.
No actual functionality changed here.
2013-01-19 08:40:19 +01:00
shadlaws
ea8219e1d4 #1941, 1948 - Fix possible warnings in movie and graphics helpers, add functions to convert between seconds and hh:mm:ss.dd.
Also add unit tests for new movie helper functions.
2013-01-19 00:59:55 +01:00
shadlaws
e2a2a5ce81 #1944 - Fix possible warnings in legal_file::get_photo_types_by_extension and legal_file::get_movie_types_by_extension.
Added unit tests for these two functions, too.
2013-01-19 00:52:13 +01:00
shadlaws
3a9009492e #1943 - Make legal_file::change_extension more robust.
Previously would fail with dots in the directory but no extension.  Added unit tests to verify the new change works.
2013-01-18 20:06:05 +01:00
Bharat Mediratta
61724f78da Update golden files. 2013-01-17 15:22:50 -05:00
Bharat Mediratta
d04080c7be Follow-on to 94b26e506c - make the new legal_file
functions more robust when passed an unknown extension.  Fixes Item_Model_Test.
2013-01-17 15:05:46 -05:00
Bharat Mediratta
9d684b7b83 Fix up some indentation. 2013-01-14 12:52:47 -05:00
Mike Miller
f92982c59c Tags by name (includes a G2 mapping) 2013-01-13 05:36:50 +02:00
shadlaws
ff6688b48b #1919 - change convert -v to convert -version 2013-01-01 15:47:04 +01:00
shadlaws
8300c867a1 #1931, #1932, #1933, #1934 - movieplayer view and movie_img function in 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-30 10:03:36 +01:00
Bharat Mediratta
58ced4d25d Merge pull request #74 from mikemayer67/master
Correction of event sent from Users_Controller::_get_change_email_form

Fixes #1930
2012-12-20 15:37:37 -08:00
Bharat Mediratta
7910084224 Check for "add" instead of "edit" in item_rest::post. Fixes #1929. 2012-12-18 13:56:28 -08:00
shadlaws
ce68177ba0 [#1928 - Make thumbnail generation more flexible for movies (graphics and 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-18 15:58:13 +01:00
Bharat Mediratta
7567f0395a Minor whitespace fix. 2012-12-17 08:13:39 -08:00
shadlaws
768e6fae09 Merge builds 261 and 262 from origin. 2012-12-16 18:56:54 +01:00
shadlaws
94b26e506c [#1924, #1925, #1927 - enhance compatibility with movies (movie helper) and 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-16 18:11:01 +01:00
Chris Chilvers
f5420b4eab fix, use $current->score 2012-12-14 17:34:33 +00:00
Chris Chilvers
a529a55e0b search within the current album by default
When searching, limit search results to the current album.
In the search results screen, display which album was searched and provide
a link to search the whole gallery.
2012-12-14 17:34:26 +00:00