Commit Graph

310 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
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
Bharat Mediratta
fa4fb20f80 If we've cleared out the last group in a combine_queue for a given
type, unset the combine_queue for that type entirely.  This way future
calls to css() and script() emit an element until there's a new call
to start_combining().  Fixes 1685.
2011-04-23 06:50:47 -07:00
Bharat Mediratta
5bc0da3652 Create before_combine and after_combine events to allow modules and themes to
interact with the combine list ahead of time, and to be able to do things like
minification after it's combined.  Fixes #1653.
2011-04-21 14:33:08 -07:00
Bharat Mediratta
dc21cf36b6 Change the $thumb_proportions variable to be a theme callback which
takes an item as an argument.  This will let us figure out proportions
in the case where a module has defined custom thumbnail sizes.
2011-03-20 10:25:59 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
08c41f2976 Add "html_attributes" theme callback to allow modules to inject attributes into
the <html> element, including things like namespaces.   Fixes #1615.
2011-01-21 00:07:00 -08:00
Bharat Mediratta
376f09c4e1 Reorganize the url() function out from in the middle of the script/css combining functions. 2011-01-15 12:47:15 -08:00
Bharat Mediratta
5ac49d497f Create new APIs for allowing themers to control what CSS/JS get
combined and when.  Backwards compatible in that old themes will work,
but their CSS/JS will no longer be combined unless they make some
changes.  Fixes #1600.
2011-01-10 22:20:12 -08:00
Joe7
f364e8a96b Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569 2011-01-03 11:38:21 -08:00
Joe7
cfaa62370e Reimplemented Kohana 2.3's View::set_global() with array support.
Allows for cleaner code and fewer function calls.
2011-01-03 11:38:13 -08:00
Bharat Mediratta
a8b0254e4a Improve the solution for #1545 by sorting the settings menu properly
to be naturally ordered and case insensitive.
2010-12-29 17:31:28 -08:00
Joe7
17700b805f Coding style fixes: identation on line 48+removed trailing whitespaces, added spaces around =s 2010-12-28 23:14:04 -08:00
Joe7
66fd8c7518 Using ON DUPLICATE KEY UPDATE instead of SELECT+UPDATE/INSERT style method (that does 2 trips to Database server and is less optimal).
exists() method is not needed anymore thus got removed
2010-12-28 23:14:04 -08:00
Joe7
fda9250796 Added limit on select as for the outcome it doesn't matter if there are 20 rows or just 1. Is sufficient to return straight after reading 1 row. 2010-12-28 23:14:04 -08:00
Bharat Mediratta
b42fcb9cda Use db::expr instead of "new Database_Expression". Resolves #1560. 2010-12-28 23:10:05 -08:00
Bharat Mediratta
dbb9b8b1c8 Sort the Admin > Settings menu instead of relying on module activation order.
Requires making Menu::get() return a reference.  Fixes #1545.
2010-12-17 22:19:46 -08:00
Bharat Mediratta
b6c202d572 Swap the order of the CSS and JS for performance. Fixes #1540. 2010-12-16 22:18:04 -08:00
Bharat Mediratta
8d030cea64 Fix a bug where simultaneous deletes of the same item can result in it
deleting the first item row in the database.  The root issue is a bug
in Kohana that's addressed in dca9b5f3fc
but in this change we deal with the fact that reloading an item can
result in an instance of the item that's unloaded.  In those cases, we
should just ignore it and move on.  Fixes #1489.
2010-11-18 09:52:40 -08:00
Bharat Mediratta
df378fcca8 Don't wrap the action in url::site() -- form::open() will do that for us. Fixes #1417. 2010-10-03 22:10:05 -07:00