Commit Graph

328 Commits

Author SHA1 Message Date
Bradley W. Dutton
bad663e05e Add dropzone js uploader as a replacement for uploadify. The latter still remains almost entirely intact. 2017-11-04 16:39:51 -07:00
shadlaws
e8752f60b8 Remove extension from cache busters of non-combined JS/CSS links (follows 2078). 2013-07-09 11:19:20 +02:00
Daniel Muller
2d20af76f9 #2078 Missing file type extension on combined css/js 2013-07-06 13:08:51 +08:00
shadlaws
a1b5cf2e8d #2051 - Revise how Gallery_View returns combined JS and CSS.
Changed Gallery_View's JS and CSS combining to:
- have get_combined() combine all groups if called without arguments.
- ensure the "core" group is combined first.
- always put links where get_combined() is called, even if combining is disabled (otherwise the order isn't preserved).
- add key as cache buster when combining is disabled.
- make "LOOKING FOR YOUR CSS/JAVASCRIPT..." comments in get_combined(), not in the theme itself.
Also, revised xss_data.txt golden file (line number changes only).
2013-03-12 15:00:59 +01:00
Bharat Mediratta
53c1ae7dca Merge pull request #204 from jozefs/issue1838
#1838 - thumb_proportion should have a minimum size.
2013-03-11 16:38:53 -07:00
Bharat Mediratta
cc80fa035a Merge pull request #207 from shadlaws/fix_siblings_callback
Fix Theme_View::siblings bug - limit and offset reversed in sibling_callback.
2013-03-11 16:35:20 -07:00
shadlaws
b6dc597c66 Fix Theme_View::siblings bug - limit and offset reversed in sibling_callback.
I wonder if this could be causing some random issues I see on the forums...
2013-03-11 23:10:27 +01:00
Jozef Selesi
3c47deb9ef Themes can choose child thumbnail when asking for proportion.
This helps themes better calculate an item's container size, for cases
when the first item significantly differs in size from the rest.

Trac-Ticket: #1838
2013-03-11 15:59:00 +01:00
Jozef Selesi
bae14a76e5 Themes can set minimum thumbnail size when calculating proportions.
This prevents broken item rendering when thumbnails are smaller than the
theme design allows.

Trac-Ticket: #1838
2013-03-11 15:54:20 +01:00
shadlaws
c137740e26 #2050 - Update Admin_View to handle events like Theme_View.
- changed Admin_View event handling to reflect that of Theme_View
(gallery_theme gets called first, admin theme gets called last,
debug mode isn't called for body_attributes and gets g-clear-fix)
2013-03-11 11:40:15 +01:00
shadlaws
9b9f1a7b07 #2031 - Add class_exists() before method_exists() if class existence is unknown.
- fixed all instances of this in core code
- deleted previous Zend Guard Loader workaround in MY_Kohana.php
- updated Bootstrap.php to reflect deleted MY_Kohana.php
2013-03-02 13:25:10 +01: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
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
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
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
Bharat Mediratta
71cf911649 Support additional where tuples in ORM_MPTT::parents. Fixes #1980. 2013-01-30 21:38:32 -05:00
Bharat Mediratta
49dd0994df Follow-on to 1e4d75c120 for #1975.
Create a siblings() function which pulls together the siblings_callback
function and makes it a more palatable API.
2013-01-30 19:32:35 -05:00
shadlaws
48bd19808c #1956 - Escape LIKE queries (for _ and %).
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-25 08:47:29 +01:00
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
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
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
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
chalbertgit
b507681427 [#1907] Added administrative variable to set lock timeout. 2012-11-13 11:51:03 -05:00
Bharat Mediratta
37a0e9a710 Follow-on to 3caf3cc323 for #1866 - harden one
more place and update the test.
2012-06-11 13:47:00 -07:00
Bharat Mediratta
03d55d2530 Encode urls in 404 log entries. Fixes #1882. 2012-06-05 21:25:56 -07:00
Bharat Mediratta
b7074ee595 Clean file paths in Kohana_Exception::debug_path(). Fixes #1880. 2012-06-05 21:13:34 -07:00
Bharat Mediratta
355679fa55 Revert "Convert any UTF-7 to UTF-8 so that fragment pages (like AJAX replies)"
This will break many legal UTF-8 strings.

This reverts commit 1c5c2e7de4.
2012-05-16 12:01:41 -07:00
Bharat Mediratta
1c5c2e7de4 Convert any UTF-7 to UTF-8 so that fragment pages (like AJAX replies)
won't be mistakenly interpreted as UTF-7.  Fixes #1869.
2012-05-16 11:32:28 -07:00
Bharat Mediratta
3caf3cc323 Harden installer against bad characters in the database name or prefix. Fixes #1866. 2012-05-15 10:54:51 -07:00
Bharat Mediratta
3d03ea697f Follow-on to ce34e89c89 for #1865 -
allow strings and coerce them to integers.  It might be easier to just
cast whatever comes in, but I'm worried that we'll accidentally cast
an array to an int(1) without realizing it.
2012-05-15 10:50:21 -07:00
Bharat Mediratta
ce34e89c89 Different approach to resolving #1865, this replaces 6a6b3f90f3
which was rolled back.
2012-05-15 09:50:57 -07:00
Bharat Mediratta
34ac1a466d Verify that theme names are well formed. Fixes #1856. 2012-05-11 15:12:30 -07:00
Bharat Mediratta
a23fed4ce1 Improve IdentityProvider switching code, patch thanks to Reklov
Nesalk.  Fixes #1834.
2012-05-07 12:04:43 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
79a2e3f1a7 Use a stdClass wrapper around the data in the before_combine and
after_combine events so that event handlers can modify the data.
Fixes #1789.
2011-10-03 21:47:18 -07:00
Bharat Mediratta
1ed54ab5dc Make the Theme_View::thumb_proportion() API call backwards compatible to
the API before dc21cf36b6.

Fixes #1775
2011-08-30 20:49:23 -07:00
Bharat Mediratta
084c2717c0 Merge branch 'master' into bharat_dev 2011-08-27 20:56:03 -07:00
Bharat Mediratta
ce43f29e2c Refactor the display context code a bit:
1) Move the display context code into the controller themselves so that it's
   more logically a continuation callback from the original controller
   rendering code.
2) Simplify the display context set/get code and put it in the item helper,
   it's just a couple of lines of code now.
3) Add more descriptive breadcrumb strings
2011-08-27 11:18:07 -07:00
Tim Almdal
933a34986d Patch for tickets #1428 and #1760
Create the concept of a Photo_Display_Context.  If the user is browsing a dynamic album (i.e. tags) and chooses to
look at an image in that album.  The display of the image happens correctly, but the 'next' and 'previous' buttons
are no longer consistent.  When one of these is clicked, Gallery  will open the adjacent image in the actuall album,
not the dynamic album.
2011-08-11 22:04:21 -07:00
Bharat Mediratta
67719c6f61 Simplification of 59b04b897b for #1764:
- Breadcrumb::build_from_item becomes Breadcrumb::array_from_item_parents
- Eliminate Breadcrumb::$id -- it's no longer necessary
- Fold Breadcrumb::generate_show_query_strings into Breadcrumb::array_from_item_parents
- Create Breadcrumb::set_first() and Breadcrumb::set_last()
- Breadcrumb::build_from_list goes away, we just use arrays for this
- Change Search_Controller and Tag_Controller to just create an array
  of Breadcrumb instances with the first/last marked appropriately
- Breadcrumb_Test loses a bunch of complexity.
2011-08-11 22:04:03 -07:00
Tim Almdal
a246b6fe45 Initial commit of a patch for Ticket #1764. as discussed here: https://github.com/gallery/gallery3/pull/58/files#r72949.
Create a Breadcrumb library which has two static methods for_item (which takes a an item and builds the entire
breadcrumb for the item) or build (which takes a variable number of Breadcrumb elements and creates a breadcrumb
based on the specified elements).

Used tag->url() to build the tag album url. Escaped the query string for the search. Tightened up the breadcrumb code
 in page.html.php.

When adding the show query parameter, we can't blindly concatenate using the ? separator.  We have to check that we
use a & if a query parameter already exists.
2011-08-11 22:04:02 -07:00
Tim Almdal
7f8056b593 fix for ticket #1759. correct parameter names to match usage. 2011-08-04 19:44:19 -07:00
Chad Parry
d2d37fe3f2 Results from a round of feedback with Bharat.
Squashed commit of the following:

commit 13dbd3515b
Merge: f0f094c 97400b7
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 30 20:33:02 2011 -0600

    Merge branch 'master' of https://github.com/gallery/gallery3 into rawphoto

commit f0f094c3f7
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 30 20:22:49 2011 -0600

    Explain the conditional rename in item::save() with a comment.

commit 1b3a6b85c1
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 30 18:29:34 2011 -0600

    Improve the comment explaining why the data_file extension is important.

commit c3e8c1e3b5
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 30 18:12:56 2011 -0600

    The data_file field is public, so we don't need to supply an accessor method.

commit 2375a02e2c
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 30 16:40:55 2011 -0600

    Change the signature of system::tempnam to something more appropriate for Gallery.

commit a8ca9dcf9e
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 30 16:10:06 2011 -0600

    Change the name of the extensions helper to legal_file.

commit 7e61a01a96
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 30 16:08:49 2011 -0600

    Change the name of the extensions helper to legal_file.

commit 4c2b2ebd3f
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Apr 27 20:52:35 2011 -0600

    Remove a newline at the end of the file that I accidentally introduced.

commit 6d564f185e
Merge: 7ff485f 4060640
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Apr 27 20:35:58 2011 -0600

    Merge branch 'master' of https://github.com/gallery/gallery3 into rawphoto

commit 7ff485fa48
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Apr 27 20:29:06 2011 -0600

    Move the extensions helpers out of the Kohana system directory and into their own Gallery Extensions class.

commit 26585fed03
Merge: 809567f c8f90e8
Author: Chad Parry <github@chad.parry.org>
Date:   Sun Apr 24 08:28:39 2011 -0600

    Merge branch 'master' of https://github.com/gallery/gallery3 into rawphoto

commit 809567f128
Author: Chad Parry <github@chad.parry.org>
Date:   Sun Apr 24 08:10:04 2011 -0600

    Expose the data file field.

commit fcb06bf175
Author: Chad Parry <github@chad.parry.org>
Date:   Sun Apr 24 00:45:12 2011 -0600

    Don't assign to the item->name field if the name is unchanged, because the save method will crash.

commit c6ef706d70
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 22:55:59 2011 -0600

    Preserve old data files long enough for them to be available to event handlers.

commit 0d6a3a3cfc
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 21:19:47 2011 -0600

    Create a tempnam substitute that safely creates files with a given extension.

commit e149cf7238
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 16:39:25 2011 -0600

    Support data files that change their extension and MIME type.

commit 6702104f57
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 16:35:00 2011 -0600

    Resolve an infinite recursion that happens when the path caches are updated during saving.

commit 944cb72eea
Merge: 567522b 5af74d4
Author: Chad Parry <github@chad.parry.org>
Date:   Fri Apr 22 14:10:42 2011 -0600

    Merge remote branch 'origin/master' into rawphoto

commit 567522bfa0
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Apr 21 20:12:32 2011 -0600

    Add an event for when a new graphics toolkit is chosen.

commit 31ba081b79
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Apr 21 02:06:53 2011 -0600

    Add an event that will collect all valid filename extensions.
2011-04-30 21:33:20 -06:00
Chad Parry
b875368167 This patch helps provide raw photo support with some small changes to the framework. Items can now change their extension and MIME type.
Squashed commit of the following:

commit 4c2b2ebd3f
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Apr 27 20:52:35 2011 -0600

    Remove a newline at the end of the file that I accidentally introduced.

commit 6d564f185e
Merge: 7ff485f 4060640
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Apr 27 20:35:58 2011 -0600

    Merge branch 'master' of https://github.com/gallery/gallery3 into rawphoto

commit 7ff485fa48
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Apr 27 20:29:06 2011 -0600

    Move the extensions helpers out of the Kohana system directory and into their own Gallery Extensions class.

commit 26585fed03
Merge: 809567f c8f90e8
Author: Chad Parry <github@chad.parry.org>
Date:   Sun Apr 24 08:28:39 2011 -0600

    Merge branch 'master' of https://github.com/gallery/gallery3 into rawphoto

commit 809567f128
Author: Chad Parry <github@chad.parry.org>
Date:   Sun Apr 24 08:10:04 2011 -0600

    Expose the data file field.

commit fcb06bf175
Author: Chad Parry <github@chad.parry.org>
Date:   Sun Apr 24 00:45:12 2011 -0600

    Don't assign to the item->name field if the name is unchanged, because the save method will crash.

commit c6ef706d70
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 22:55:59 2011 -0600

    Preserve old data files long enough for them to be available to event handlers.

commit 0d6a3a3cfc
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 21:19:47 2011 -0600

    Create a tempnam substitute that safely creates files with a given extension.

commit e149cf7238
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 16:39:25 2011 -0600

    Support data files that change their extension and MIME type.

commit 6702104f57
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Apr 23 16:35:00 2011 -0600

    Resolve an infinite recursion that happens when the path caches are updated during saving.

commit 944cb72eea
Merge: 567522b 5af74d4
Author: Chad Parry <github@chad.parry.org>
Date:   Fri Apr 22 14:10:42 2011 -0600

    Merge remote branch 'origin/master' into rawphoto

commit 567522bfa0
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Apr 21 20:12:32 2011 -0600

    Add an event for when a new graphics toolkit is chosen.

commit 31ba081b79
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Apr 21 02:06:53 2011 -0600

    Add an event that will collect all valid filename extensions.
2011-04-28 19:41:44 -06:00
Bharat Mediratta
5cf38ed816 Stop using Pagination() and instead use $theme->pager() in views.
Move the pager() function up to Gallery_View and replace
themes/admin_wind/views/pager.html.php (Pagination based) with a
modified version from the wind theme in
themes/admin_wind/views/paginator.html.php.  Fixes #1718.
2011-04-26 09:48:21 -07:00
Bharat Mediratta
b57b229543 Merge branch 'alindeman/1628' of git://github.com/alindeman/gallery3 into andy 2011-04-23 13:16:27 -07:00
Bharat Mediratta
76a7ad3161 Overhaul of the uploader code:
- Propagate size limits (including detecting memory limits from GD) down to the
  Flash so that we don't even start uploads that won't work
- Improve the error messages to be more user meaningful and provide links to the
  codex for errors
- Tell the user up front what the file size limit is.

Fixes #1638
2011-04-23 10:07:32 -07:00
Andy Lindeman
c101151616 Allow tags to be merged by renaming
* Fixes #1628
2011-04-23 12:04:43 -04:00
Tim Almdal
a1f419435c Merge branch 'master' of git@github.com:gallery/gallery3 2011-04-23 07:27:02 -07:00
Tim Almdal
4b01676f32 Fix for ticket #541
Added a theme_info variable to the theme globals.  The properties in the theme.info file are now contained in this theme_info structure.

Access is:
  <?= $theme_info->author ?>
will display the theme author.
2011-04-23 07:25:33 -07:00