Commit Graph

2225 Commits

Author SHA1 Message Date
Bharat Mediratta
9d6ed037bb Merge branch 'jquery_190' 2013-02-23 01:09:30 -05:00
shadlaws
94aadf03da #2008 - Add warnings if some active modules are obsolete.
- added module::get_obsolete_modules_message function
- put message on admin/dashboard
- put message on admin/modules
- put message on upgrader
- updated unit test golden file xss_data
2013-02-20 17:30:27 +01:00
Bharat Mediratta
3e3ed1c819 Fix up some tests:
- unlink copied files because they confused File_Structure_Test
- update golden files
2013-02-18 15:31:59 -05:00
shadlaws
ab920ae360 #1749, 1754, 1901 - Eliminate incompatibility with Zend Guard Loader.
- added MY_Kohana to provide wrapper for auto_load(), which loads dummy class when none found.
- revised Bootstrap to load MY_Kohana.

This is based on the patch described here: http://blog.teatime.com.tw/1/post/403
2013-02-18 19:12:45 +01:00
Bharat Mediratta
f95159c0b8 Merge branch 'jquery_190' of github.com:gallery/gallery3 into jquery_190 2013-02-18 13:10:45 -05:00
Bharat Mediratta
195210a2ab Merge branch 'master' into jquery_190 2013-02-18 13:07:53 -05:00
shadlaws
4bf41377b8 Moved autocomplete CSS to gallery.css to ensure it works for all themes (including admin_wind). 2013-02-18 18:29:31 +01:00
shadlaws
fd0051dab7 #2006 - Add system::mark_file_for_delete API to delete files at shutdown.
- added system::mark_file_for_delete to be called to mark a file
- added system::delete_marked_files to be called at shutdown to delete the list
- amended system::temp_filename to, by default, add the temp name to the list
- updated a few other places in code where this should be used
2013-02-17 23:19:35 +01:00
Bharat Mediratta
cc45e2e33b Merge branch 'master' into jquery_190 2013-02-16 23:53:58 -05:00
Bharat Mediratta
96ad7789c8 Follow-on to 7bdccade98 to exclude
directories for now.
2013-02-15 19:17:34 -05:00
Bharat Mediratta
0dd12caa6f Follow-on to 7bdccade98 - point out that there's
duplicated code in gallery_event.
2013-02-15 19:12:08 -05:00
Bharat Mediratta
7bdccade98 Every 500th request prune a single old file from var/tmp and var/logs.
Might not be aggressive enough.  Fixes #2005.
2013-02-15 19:09:06 -05:00
shadlaws
4dd7b708b2 Dialog sizing, titles, and z-index. This should ensure the small <500px dialogs
are correct, all titles are correctly sized, and the dialog boxes go to
the top for older themes, too.
2013-02-15 19:31:20 +01:00
Bharat Mediratta
8b0088fd8d Change gallery/bin -> gallery3/bin in the comment since I suspect most
people don't change the name of the directory.  Follow-on to
1d7f5e3ab1 for #1935
2013-02-15 13:23:05 -05:00
shadlaws
f212f6a794 #2003 - Add admin/movies screen.
Added admin/movies screen analogous to the admin/graphics screen so the user can:
- see how FFmpeg is configured (path and version, similar to toolkits in admin/graphics)
- get some instructions on how to install FFmpeg if not found
- change the movie_allow_uploads setting
- ask Gallery to rebuild their movie thumbs
Specifics:
- admin_movies, admin_movies.html (new) - new Movies admin screen
- ffmpeg.png (new) - logo for admin screen
- movie::get_ffmpeg_version (new) - return version number and date of FFmpeg
- form_uploadify.html - change admin message if movie uploads are disabled
- gallery_event::admin_menu - added Movies link to Settings
- xss_data.txt - updated golden file for unit tests
2013-02-14 23:42:20 +01:00
Bharat Mediratta
6c861a014d Merge pull request #133 from shadlaws/followon_1994
Follow-on to 0312d1b071 for #1994.
2013-02-14 11:18:45 -08:00
Bharat Mediratta
8a1133952e Merge pull request #134 from shadlaws/fix_2001
#2001 - Make filename sanitizing more consistent.
2013-02-12 09:24:37 -08:00
shadlaws
d04a6fc87d #2001 - Make filename sanitizing more consistent.
- legal_file - added sanitize_filname() to sanitize photo/movie filenames.
- admin_watermarks - revised add() to use new function.
- item model - added _process_data_file_info() to validate the data file, get its metadata, and sanitize the item name.
- item model - revised save() for new items to use _process_data_file_info *before* the slug is checked.
- item model - revised save() for updated items to use _process_data_file_info.
- item model - revised save() for updated items to sanitize name if changed.
- uploader - removed call to smash_extensions (item model does this when it calls sanitize_filename).
- Legal_File_Helper_Test - added unit tests for sanitize_filename.
- Item_Model_Test - revised existing unit tests based on changes.
- Item_Model_Test - added new unit tests for names with legal but incorrect extensions.
- Averted take over by HAL with fix #2001...
2013-02-12 00:37:33 +01:00
shadlaws
0a2670a19a #1988 - Add movie_allow_uploads option ("always", "never", or "autodetect").
- gallery_installer, module.info, install.sql - add movie_allow_uploads variable
- movie::allow_uploads (new) - return true if movie_allow_uploads is "always" or "autodetect" and FFmpeg found, false otherwise
- legal_file - use movie::allow_uploads instead of movie::find_ffmpeg
- Form_Uploadify - use movie::allow_uploads instead of movie::find_ffmpeg
2013-02-12 00:30:30 +01:00
Bharat Mediratta
33149ef87a Merge pull request #121 from shadlaws/fix_1935_only
#1935 - Make FFmpeg easier to install.
2013-02-10 21:51:05 -08:00
Bharat Mediratta
bb7590152d Merge pull request #132 from shadlaws/fix_2000
#2000 - Make legal_file::smash_extensions more robust.
2013-02-10 21:42:24 -08:00
shadlaws
27be4ae606 Follow-on to 0312d1b071 for #1994.
- Updated function comments to match revisions.
- No functional changes.
2013-02-10 10:10:44 +01:00
shadlaws
bfdf5a00fd #2000 - Make legal_file::smash_extensions more robust.
- Fixed legal_file::smash_extensions.
- Added new unit test.
- Removed duplicated condition in existing unit test.
2013-02-10 02:28:47 +01:00
Bharat Mediratta
9dbe2e15ad Extend siblings callbacks to take a $limit and an $offset for navigating
large sibling sets.  Useful for the thumbnav module since we don't want to
iterate a thousand siblings to find the one we care about.  Fixes #1999.
2013-02-09 14:53:34 -05:00
shadlaws
1d7f5e3ab1 #1935 - Make FFmpeg easier to install.
- system::find_binary - add Gallery's bin subdirectory to search
- system::find_binary - auto-fix permissions if found in Gallery's bin directory
2013-02-09 20:48:02 +01:00
Bharat Mediratta
11e56b29da Merge pull request #130 from shadlaws/fix_1997
#1997 - Correct movie dimensions and mime type improperly set by contributed modules.
2013-02-09 10:36:42 -08:00
Bharat Mediratta
2dc695c606 Merge pull request #129 from shadlaws/fix_1996
#1996 - Add blacklist to legal_file helper.
2013-02-09 10:36:03 -08:00
Bharat Mediratta
7613d886f9 Merge pull request #128 from shadlaws/fix_1994
#1994 - Make get_file_metadata throw an exception if photo or movie is unidentifiable/illegal.
2013-02-09 10:35:04 -08:00
shadlaws
8dcdb3b8e1 #1997 - Update movie dimensions and mime type if previously set without FFmpeg.
- 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.
2013-02-09 18:12:08 +01:00
shadlaws
942233dd26 #1996 - Add blacklist to legal_file helper.
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).
2013-02-08 15:21:57 +01:00
shadlaws
0312d1b071 #1994 - Make get_file_metadata throw an exception if photo or movie is 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.
2013-02-08 13:51:41 +01:00
shadlaws
2dc97fab05 #1993 - Remove "failed" query string from upgrader redirect if there are no 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.
2013-02-08 09:03:57 +01:00
shadlaws
2da4d9dd1f #1992 - Improve examples for thumb/resize/file path/url functions in item model.
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
2013-02-07 09:49:28 +01:00
Bharat Mediratta
d9273038b0 Merge pull request #124 from shadlaws/fix_1991
#1991 - Add options to graphics::mark_dirty to specify type and/or mime type
2013-02-06 14:58:25 -08:00
shadlaws
faa719551d #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.
2013-02-06 11:04:24 +01:00
shadlaws
1ae1165229 Follow-on to 949b8cda14 for #1982.
- 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.
2013-02-06 10:24:06 +01:00
Bharat Mediratta
0d9c4da0ff Merge pull request #118 from shadlaws/fix_1982_followon
Follow-on to f83ed5f871 for #1982.
2013-02-03 09:44:51 -08:00
Bharat Mediratta
3439eb5700 Merge branch 'master' of github.com:gallery/gallery3 2013-02-02 23:41:53 -05:00
Bharat Mediratta
dece6dc5a5 Create gallery::allow_css_and_js_combining() which lets you disable combining CSS/JS
by touching var/DONT_COMBINE.  Fixes #1989.
2013-02-02 23:39:16 -05:00
shadlaws
bc0bf10643 Follow-in to 314e2e67b1 for #1986.
- Update xss_test golden file (change line numbers).
2013-02-02 14:04:15 +01:00
shadlaws
949b8cda14 Follow-on to f83ed5f871 for #1982.
- Fix unit test for album url since empty albums now have thumbnails.
2013-02-02 10:02:37 +01:00
Bharat Mediratta
9396342250 Drop the requirement to have the install() function set the module
version.  It's redundant.  Fixes #1985.
2013-01-31 19:55:53 -05:00
Bharat Mediratta
cb08f6cc13 Merge pull request #115 from shadlaws/fix_1982
#1982 - Add placeholder for albums with no album cover.
2013-01-31 15:48:18 -08:00
Bharat Mediratta
ea54a88ec8 Escape the host/username/password arguments to mysqldump. Fixes #1984. 2013-01-31 16:29:09 -05:00
shadlaws
fd8b8de242 #1983: Remove item keys changed for/by graphics::generate from significant 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.
2013-01-31 18:59:33 +01:00
shadlaws
f83ed5f871 #1982 - Add placeholder for albums with no album cover.
- 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.
2013-01-31 17:18:39 +01:00
Bharat Mediratta
8d15e5cb2e Follow-in to cff1e76e8d for #1978
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.
2013-01-30 21:42:47 -05:00
Bharat Mediratta
71cf911649 Support additional where tuples in ORM_MPTT::parents. Fixes #1980. 2013-01-30 21:38:32 -05:00
Bharat Mediratta
075b95f0ed Actually disable the "make album cover" option when the item is already the album cover. Fixes #1979. 2013-01-30 21:18:26 -05:00
Bharat Mediratta
cff1e76e8d When changing the album cover, find and retarget any other albums which were using the old item as their album cover. Fixes #1978. 2013-01-30 21:08:36 -05:00