Commit Graph

444 Commits

Author SHA1 Message Date
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
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
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
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
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
549630219f bug fix: updated file_proxy.php to use legal_file helper instead of hard-coded list of movie file extensions.
bug fix: updated uploader.php to use legal_file helper instead of hard-coded list of movie file extensions.

Fixes #1926
2012-12-10 11:15:02 -08:00
Gerhard Schlager
a62e1aaf9d the HTTP header Cache-Control must contain "public" in order to allow caching of resources when HTTPS is used 2012-08-11 18:09:03 +02:00
Bharat Mediratta
8524fba15a Sanitize the module name and don't allow storing values for illegal
module names.  Fixes #1898.
2012-07-21 15:42:52 -07:00
Bharat Mediratta
9e1f975e7b Fix up syntax in the last change. Follow-on for #1879. 2012-06-05 14:08:15 -07:00
Tony Fung
6fbea19b35 Force Turn off the compress as most image file already compressed. 2012-06-05 11:16:37 +08:00
Bharat Mediratta
3fbe07078f Second attempt to fix #1821 - first attempt caused an infinite loop in some cases
when zlib.output_compression is enabled.
2012-06-04 19:54:01 -07:00
Bharat Mediratta
9e2ea2ffed Smash multiple extensions down into a single one when accepting file
uploads.  Fixes #1872.
2012-05-17 20:25:27 -07:00
Bharat Mediratta
891652b233 Send back form errors wrapped in JSON. Fixes #1867. 2012-05-15 16:00:46 -07:00
Bharat Mediratta
f06c227505 Oops dropped a semicolon in e3d50dd8be 2012-05-15 09:26:13 -07:00
Bharat Mediratta
e3d50dd8be Simplify dialog title for editing advanced settings. Fixes #1864. 2012-05-14 20:52:01 -07:00
Bharat Mediratta
1531c3898f Force uploader status messages to be integers. Fixes #1863. 2012-05-14 20:52:01 -07:00
Bharat Mediratta
b512734b9d Close all buffers, not just the ones that Kohana opened. Fixes #1821,
thanks to pvalsecc.
2012-05-08 18:23:33 -07:00
Bharat Mediratta
fd15295642 Clean up comments. 2012-05-05 21:09:30 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
47fdf1e35a Move the Content-Length header into the main block, fix some formatting.
Follow-on to 5b969fd069 which is a fix for
#1802.
2011-11-24 11:21:32 -08:00
ffchung
5b969fd069 gzip stream problem on Google Chrome 2011-10-29 23:03:06 +08:00
Bharat Mediratta
e5175fd277 Fix the standard and REST uploaders to use a callback function to
delete temporary files during shutdown.  Fixes #1788.
2011-10-03 23:19:44 -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
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
Chad Kieffer
f4d76a8abe Don't put the Admin > Theme Options Save button in a fieldset. 2011-04-24 13:56:39 -04:00
Bharat Mediratta
c1df782a75 Use an absolute url for the upgrader link. Also, clear the upgrade_now
site status message every time we go to Admin > Modules.
Fixes #1695.
2011-04-23 13:04:48 -07:00
Tim Almdal
d7e2990152 Insure that the number of items for a page is greater than zero. Fixes ticket 1644. 2011-04-22 15:02:30 -07:00
Chad Kieffer
3bce5d00ee Renamed apple_touch_url to apple_touch_icon_url. 2011-04-22 12:50:21 -04:00
Chad Kieffer
fbf02970e1 Merge branch 'master' of git://github.com/gallery/gallery3 2011-04-22 12:38:10 -04:00
Chad Kieffer
4a9b45c9c3 Created apple-touch-icon and added to wind and admin_wind themes. 2011-04-22 12:37:28 -04:00
Bharat Mediratta
deb7db6486 Clear the site status for missing themes when we view this page -- if
something goes wrong we'll just add it back again anyway.  Follow-on
for #1655.
2011-04-22 09:29:25 -07:00
Andy Lindeman
1d0f4b7a43 [Fixes #1574] Render the login form in the same way in every action
This makes sure the "Forgot Your Password?" link appears when the HTML form
is initially rendered.
2011-04-03 15:47:46 -05:00
Bharat Mediratta
3fd7debd2f Fix a bug where the placeholder %hide-url didn't match the variable in the assoc. array. Follow on for #1624 2011-03-15 00:53:35 -07:00
colings
ca47b887f5 Added extra arg to gallery_graphics calls and updated users 2011-02-23 20:31:07 -06:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
56e6cb998f Change the [x] close box to "(remind me later)". #1605. 2011-01-17 21:37:51 -08:00
Bharat Mediratta
83bf1d767b Fix typo: upgrade_check -> upgrade_checker
#1605.
2011-01-17 21:18:24 -08:00
Bharat Mediratta
20ae106c22 Display a message in the "Check for Gallery upgrades" block when
there's a newer version available, even if the user has dismissed the
site status message.  #1605.
2011-01-17 21:16:43 -08:00
Bharat Mediratta
45caba09f8 Move the code that clears the upgrade_check site status message to the
upgrader so that it's cleared any time we run an upgrade.  Part of
2011-01-17 20:03:11 -08:00
Bharat Mediratta
70abfb2a20 Upgrade checking code is now here, along with a bump of the Gallery
module to v46.  There's a new block in the admin dashboard which
controls whether automatic checking happens, and lets you check
immediately.  If a newer version is detected, a site status message
appears for admins providing upgrade instructions.

Automatic checking is not yet implemented (even though the UI claims
that it exists).  This is all for #1605.
2011-01-16 22:16:09 -08:00
Bharat Mediratta
09d34696a1 Update comments to annotate what data is where during the process.
Follow-on for #1518.
2011-01-11 17:54:33 -08:00
Bharat Mediratta
e3df9c1611 Merge branch 'Ticket#1518' of git://github.com/Joe7/gallery3 2011-01-11 17:53:16 -08:00
Bharat Mediratta
ee53744aa7 Two improvements to Joe's fix for #1504:
1) Trap all exceptions, eg dns or connectivity issues and
   report back in the form (but put the stack trace in the logs)
2) Rename "noconn" to "no_connection"
2011-01-11 16:59:57 -08:00
Bharat Mediratta
f80b5959f1 Merge branch 'Ticket#1504' of git://github.com/Joe7/gallery3 2011-01-11 15:38:03 -08:00
Bharat Mediratta
252aba9eae Merge branch 'fix-viewable2_master' of git://github.com/BigMadWolf/gallery3 2011-01-11 15:17:05 -08:00