Commit Graph

4686 Commits

Author SHA1 Message Date
Bharat Mediratta
5bf0500271 Merge pull request #170 from shadlaws/fix_2022
#2022 - Fix handling of watermark dialog errors.
2013-02-27 09:14:01 -08:00
Bharat Mediratta
7c94b930ed Merge pull request #169 from shadlaws/fix_2021
#2021 - Cleanup thumb_dirty and resize_dirty instances.
2013-02-27 09:12:13 -08:00
shadlaws
ea4622f726 #2022 - Fix handling of watermark dialog errors.
- admin_watermarks: changed header at end of form_add() from text/html to text/plain
- admin_watermarks: added header at end of form_edit() and form_delete() just like form_add() (currently omitted)
- admin_watermarks/gallery.dialog.js: removed unnecessary encode/decode workaround
2013-02-27 09:49:05 +01:00
shadlaws
891a24151e #2021 - Cleanup thumb_dirty and resize_dirty instances.
- g2_import: changed "false" assignment to "0" assignment for consistency.
- admin_theme_options: removed unused variables (they're called/used nowhere else).
- graphics: removed stanza that clears thumb_dirty and resize_dirty and returns
if we have no ops.  This has no effect on Gallery currently (for one,
graphics::generate doesn't normally get called on an item with no dirty flags),
but can inconsistently set resize_dirty of albums and movies to 0 where it's
otherwise left at 1.  Going forward, it may be useful to be consistent here.
- gallery_installer: added v57 stanza to correct any resize_dirty flags of
movies/albums that were previously reset to 0.
- module.info, install.sql: update to v57
2013-02-27 07:11:52 +01:00
shadlaws
251e9d5c8f #2010 - Revise item::find_by_path to search for jpg-converted items.
- added extra $var_subdir argument to item::find_by_path.
- changed item::find_by_path to use $var_subdir to detect if we should look for a jpg-converted item or not (e.g. movie thumbs)
- moved the album thumb detection to item::find_by_path to ensure it knows to look for an exact album match.
- added more sanity checks to item::find_by_path (now has fewer false positive possibilities).

- updated file_proxy to remove the need to guess different movie files.
- updated File_Proxy_Controller - new sanity checks catch previously undetected bug.
- added additional unit tests for item::find_by_path.
2013-02-26 18:39:59 +01:00
shadlaws
62335da791 Follow-on from autocomplete updates.
(9345dde83e, d632ef3e50)
- gallery module: added loading-small.gif (so all themes have it by default)
- gallery module: added css for .ui-autocomplete-loading (copied from .g-loading-small in wind,
but without !important so other themes can override it)
- gallery module: updated upgrader.html.php to use new image (removes theme dependence)
- wind theme: removed outdated css for .ac_loading (not used in v3.0.5, either)
- server_add module: removed multiple argument from autocomplete (doesn't work well with it)
2013-02-26 13:07:00 +01:00
shadlaws
f980608987 Follow-on from autocomplete and gallery.panel.js revisions.
(9345dde83e, d632ef3e50, fd012276cb)
- revised xss_data.txt golden file (no new cases).
- escaped translated string in admin_users.html.php (would have otherwise been a new case in xss_data.txt).
2013-02-25 15:09:42 +01:00
Bharat Mediratta
0a957c293f Merge pull request #160 from shadlaws/fix_2014
#2014 - Clean up gallery.ajax.js.
2013-02-23 16:07:05 -08:00
shadlaws
b52a533a0f #2014 - Clean up gallery.ajax.js.
- prepend "data-" in front of non-standard attr to be more standards compliant.
- fix formatting.
2013-02-23 21:49:29 +01:00
shadlaws
fd012276cb #2013 - Clean up gallery.panel.js.
- prepend "data-" in front of non-standard attr to be more standards compliant.
2013-02-23 21:29:09 +01:00
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
1b6bae2e80 Merge pull request #154 from shadlaws/master
Follow-on to fd0051dab7 for #2006.
2013-02-18 16:23:07 -08:00
shadlaws
62035bdbe1 Follow-on to fd0051dab7 for #2006.
- fix unit tests for watermarks, which check for deleted files.
2013-02-18 23:30:29 +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
Bharat Mediratta
97f96bcb48 Merge pull request #150 from shadlaws/fix_zend_guard_loader_issues
#1749, 1754, 1901 - Eliminate incompatibility with Zend Guard Loader.
2013-02-18 10:20:52 -08: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
Bharat Mediratta
e3eee27c72 Merge pull request #153 from shadlaws/jquery_autocomplete_compat
Moved autocomplete CSS to gallery.css to ensure it works for all themes (incl. admin_wind)
2013-02-18 10:00:14 -08:00
shadlaws
58c137c981 #2007 - Change search box text when only looking in the current album.
- search.html.php - updated to use new labels.
- search_link.html.php - updated to use new labels.  Moved code that determines
current album to top, then used it for both the new label and the hidden album
input.  Resulting form code looks more symmetric to search.html.php.
2013-02-18 18:55:03 +01: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
4f779e9083 Password strength indicator fixed for new jQuery. Also cleaned up formatting. 2013-02-18 18:09:29 +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
9345dde83e Fix autocomplete for admin_g2_import. 2013-02-17 00:39:30 -05:00
Bharat Mediratta
a000540565 Updated for the new jQuery tabs API. 2013-02-17 00:30:56 -05:00
Bharat Mediratta
d632ef3e50 Fix up autocomplete for admin_server_add - found and fixed some bugs
in gallery_autocomplete when "multiple" isn't set.  Fixed some
harmless syntax issues that js2-mode helpfully pointed out.
2013-02-17 00:23:50 -05: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
Bharat Mediratta
96a01c86d9 Merge branch 'master' into jquery_190 2013-02-15 13:00:26 -05:00
Bharat Mediratta
264e1e82b2 Digibug up and vanished. Move the module to contrib for now. This
will leave the module active in any existing installs that had it
active, but that shouldn't cause any negative impact.  Fixes #2002.
2013-02-15 12:57:42 -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
72a6a8abaf Follow-on to 9dbe2e15ad for #1999.
Fix an issue where siblings() by itself throws an error.  The problem is that
Theme_View::siblings() passes a null offset and limit to the callback which
gets passed down to search::search_within_album, which creates its query
in raw SQL and doesn't check for a null offset/limit.  We want a reasonable
limit on the size of the set here (and 1000 is probably wayyy too high so
lower that to 100) so amend get_siblings to stop using default parameters
and actually check the inputs.

Author: Bharat Mediratta <bharat@menalto.com>
Date:   Sat Feb 9 14:53:34 2013 -0500

    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-14 14:43:03 -05: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
3b9eb29d89 Merge pull request #143 from mikeage/g2_import
Replace = with ==
2013-02-13 13:55:27 -08:00
Mike Miller
d3ca2617f2 Replace = with ==
This was my mistake; I didn't test it thoroughly. It results in all g2 mappings being broken!
2013-02-13 23:11:32 +02: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