Commit Graph

61 Commits

Author SHA1 Message Date
Bharat Mediratta
a563dcdfb3 Convert the missing movie placeholder over to a JPG for consistency. Fixes #1828. 2012-05-07 21:41:28 -07:00
Bharat Mediratta
ef4dbd18af Fix extension-swapping code for files that have extensions that are
not 3 characters long.  Fixes #1845.
2012-05-05 19:34:01 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
5020f2184c Better fix for dc21cf36b6 - let's just fix up
the root album thumbnail when the proportions change so that we avoid
this problem altogether.
2011-11-03 21:15:10 -07:00
Chad Parry
0672c8f83f Polishing the rawphoto changes, including adding some tests.
Squashed commit of the following:

commit 945316a8c220b12adb687c896bcc5e86f99f46a4
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Jul 21 01:11:13 2011 -0600

    Add a test for the sunny-day scenario where a rule changes a data file's MIME type.

commit 4ee1ee000c8f4d8ebaae66f637bc71080486fd73
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Jul 21 00:49:47 2011 -0600

    Ensure that a third-party cannot swap out a legitimate photo with an unsafe file type.

commit 7dd0105bfc59c150e5640e693778f51bbaa44eab
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Jul 21 00:48:19 2011 -0600

    Update the MIME type and other meta-data when a new data file is provided.

commit 5a8844c7947b21cf658f22cc61f20ffa9e8f07f2
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Jul 21 00:30:01 2011 -0600

    Remove a unit test that no longer applies. Replacement data files are allowed to have different MIME types.

commit 0de9c6283ce4f5773cad8e92b6785d6a1f7b5e46
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Jul 21 00:27:45 2011 -0600

    If one rule fails, then abort processing, rather than trying to proceed to subsequent rules.

commit 41d379c2b777ae7b3a11f528971228e234f8976f
Author: Chad Parry <github@chad.parry.org>
Date:   Thu Jul 21 00:10:10 2011 -0600

    Replace an overly-complicated regular expression with a simple in_array, at Bharat's suggestion.

commit 1b3f7111d4c2607baaa2da0aab3b501f2d9a1426
Merge: 8f7904a 403f64b
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Jul 20 21:02:56 2011 -0600

    Merge branch 'master' into rawphoto

commit 8f7904ab62c71a7e4ee68762f936030b4dcb4ea1
Merge: e950573 771de0a
Author: Chad Parry <github@chad.parry.org>
Date:   Sat Jun 25 14:12:39 2011 -0600

    Merge branches 'master' and 'rawphoto' into rawphoto

commit e95057337996351e49915d9f85d007d50103a4be
Author: Chad Parry <github@chad.parry.org>
Date:   Wed Jun 15 20:24:18 2011 -0600

    Merge branches 'rawphoto-squash' and 'rawphoto' into rawphoto
2011-07-21 01:12:26 -06:00
Chad Parry
c76c4e6548 Refer to "rules" not "filters" 2011-06-15 20:15:20 -06:00
Chad Parry
97c3ded2ba Better validation for uploaded files, especially where third-party modules might make a mistake.
Squashed commit of the following:

commit f2336a5aaa
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 18 21:56:10 2011 -0600

    Behave reasonably if the image cannot be resized.

commit e06b20738d
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 18 21:10:08 2011 -0600

    Adding an image representing a broken thumbnail.
    This image was derived from the equivalent Gallery2 icon. It uses the same washed-out gray color scheme as the Gallery3 missing_movie icon.

commit 4e3964527b
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 18 20:30:28 2011 -0600

    Initialize legal file arrays correctly.

commit e9862d8fbc
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 18 20:20:19 2011 -0600

    Correction for the merge conflict markers I accidentally committed.

commit 5e62d327a8
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 18 20:17:36 2011 -0600

    Expand the legal_file events to include separate photo and movie events, and to support MIME types.

commit f0bfd1fef0
Merge: 72f3fc4 db73413
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 18 19:49:25 2011 -0600

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

    Conflicts:
    	modules/gallery/helpers/system.php
    	modules/gallery/tests/System_Helper_Test.php

commit db734130c5
Author: Automatic Build Number Updater <bharat+gallery3_build_number_updater@menalto.com>
Date:   Mon May 16 21:38:07 2011 -0700

    Automated update of .build_number to 153 for branch master
    Last update: 9aeb824aa1 (1 commits ago)

commit 8549ba30ca
Author: Chad Kieffer <ckieffer@gmail.com>
Date:   Mon May 16 22:37:09 2011 -0600

    Stop IE 9 album grid craziness. Thanks floridave. Fixes #1430.

commit 9aeb824aa1
Author: Automatic Build Number Updater <bharat+gallery3_build_number_updater@menalto.com>
Date:   Sun May 8 11:43:38 2011 -0700

    Automated update of .build_number to 152 for branch master
    Last update: 7c80e6ef84 (1 commits ago)

commit 57f7e42a12
Author: Bharat Mediratta <bharat@menalto.com>
Date:   Sun May 8 11:42:40 2011 -0700

    Add the item id to the print_proxy line so that we have a little more info
    about what the original was, and extend the timeout to 90 days from 10.
    Fixes #1733.

commit 7c80e6ef84
Author: Automatic Build Number Updater <bharat+gallery3_build_number_updater@menalto.com>
Date:   Fri May 6 11:48:43 2011 -0700

    Automated update of .build_number to 151 for branch master
    Last update: 5d09cbff04 (1 commits ago)

commit 80dda6f64f
Merge: 5d09cbf 46da011
Author: Bharat Mediratta <bharat@menalto.com>
Date:   Fri May 6 11:48:13 2011 -0700

    Merge pull request #52 from chadparry/tempnam

    Fixes #1732

commit 5d09cbff04
Author: Automatic Build Number Updater <bharat+gallery3_build_number_updater@menalto.com>
Date:   Thu May 5 21:53:39 2011 -0700

    Automated update of .build_number to 150 for branch master
    Last update: 011eaa6480 (1 commits ago)

commit d5a31ceede
Author: Tim Almdal <tnalmdal@shaw.ca>
Date:   Thu May 5 21:53:10 2011 -0700

    Fix for ticket 1275. Do the same checking as Kohana uses and don't worry about calling the utf8_encode routine.
    Corrected the error messages and also added a check to insure the XML Parser extension is loaded as we still need the utf8_encode function from it.

commit 011eaa6480
Author: Automatic Build Number Updater <bharat+gallery3_build_number_updater@menalto.com>
Date:   Thu May 5 14:53:06 2011 -0700

    Automated update of .build_number to 149 for branch master
    Last update: 05ecfda36b (1 commits ago)

commit 5bae21864f
Author: Bharat Mediratta <bharat@menalto.com>
Date:   Thu May 5 14:52:47 2011 -0700

    Follow-on to 6f916e49d5 -- don't make
    database calls if Gallery isn't installed, else we fail to bounce the
    user to the installer on fresh packages.  #1637.

commit 46da011bf6
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 4 17:51:00 2011 -0600

    Remove a newline I accidentally introduced.

commit 5c6c71ffcd
Merge: d2331bf 05ecfda
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 4 17:49:42 2011 -0600

    Merge branch 'master' into tempnam

commit d2331bf434
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 4 17:48:25 2011 -0600

    Simplified the temp_filename implementation and removed the mocks.

commit 72f3fc46f6
Author: Chad Parry <github@chad.parry.org>
Date:   Wed May 4 17:22:15 2011 -0600

    Avoid "self::" because Kohana can't override it.

commit 05ecfda36b
Author: Automatic Build Number Updater <bharat+gallery3_build_number_updater@menalto.com>
Date:   Mon May 2 21:38:50 2011 -0700

    Automated update of .build_number to 148 for branch master
    Last update: 97400b7815 (2 commits ago)

commit 229bfc5c7c
Author: Bharat Mediratta <bharat@menalto.com>
Date:   Mon May 2 21:37:04 2011 -0700

    Track and redirect core.DownloadItem requests properly.  This can
    happen if the G2 was imported with rewrite on, so the g2_url in the
    g2_map table has a shortened url, but then rewrite is disabled and the
    .htaccess mod_rewrite rules are sending over a &g2_view=core.DownloadItem
    request.  Fixes #1728.

commit 68370b92f5
Author: Bharat Mediratta <bharat@menalto.com>
Date:   Mon May 2 21:36:17 2011 -0700

    Map the G2 album highlight thumbnail derivative id to the G3 album's
    thumbnail.  Fixes #1729.

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 0e844766ba
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 5c9a3b3f39
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 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-05-18 22:01:51 -06:00
Bharat Mediratta
c3b0c96460 Revert 0235c2062e and instead apply the fix from
iptox.net listed here: http://gallery.menalto.com/node/98768#comment-372398

Fixes for #1681, #1625
2011-04-23 19:59:54 -07:00
Bharat Mediratta
01055fb54f Merge branch 'master' of github.com:gallery/gallery3 2011-04-23 10:08:48 -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
Tim Almdal
0235c2062e Fix for ticket #1681 (and maybe #1625). Change the parameter from -v to -version. 2011-04-23 08:13:01 -07:00
colings
68edb2454d Added 'item' to parameters passed to graphics rules 2011-02-21 15:40:58 -06:00
colings
d759d47ef9 Merge remote branch 'upstream/master' 2011-02-13 10:46:43 -06:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
23eaec7063 Stop using "which" to find binaries. Create system::find_binary()
which traverses the $PATH and returns any executable binary of the
appropriate name that it can find.  Fixes #1555.
2011-01-10 15:49:15 -08:00
Bharat Mediratta
bd6bd029a7 Fix up the version detecting regex for GraphicsMagick and don't crash
if the regex doesn't return properly.  Follow on to
3ec0ba956d for ticket #1595.
2011-01-10 14:04:15 -08:00
Joe7
eecb244291 Made t() calls parsable by localization scanner 2011-01-09 02:06:35 +01:00
Joe7
7dd63630d8 Minor coding style fix 2011-01-08 19:44:46 +01:00
Joe7
3ec0ba956d Refactored graphics::detect_toolkits() so ImageMagick and GraphicsMagick shares the same loop. Just as premarked as todo.
Will make https://sourceforge.net/apps/trac/gallery/ticket/1555#comment:3 an even quicker task
2011-01-08 19:39:23 +01:00
colings
c2a1ea64ed Tweak to include parent_id in resize call, for custom albums. 2011-01-02 09:48:23 -06:00
Bharat Mediratta
eb010554ff Replace self::func() with <helper_name>::func() for all public APIs
and constants to make overloading easier.  Fixes #1510.
2010-11-28 11:27:25 -08:00
Bharat Mediratta
790bf4e871 Prioritize using the value in graphics_toolkit_path over the standard
path so that if you change that value in Admin > Settings > Advanced
we prefer it over other paths (which may be restricted by
open_basedir).  Fixes #1395.
2010-09-22 21:35:49 -07:00
Bharat Mediratta
3e1743b21f Add a module variable containing extra paths to search for binaries.
Fixes ticket #1384.
2010-09-16 20:43:48 -07:00
Bharat Mediratta
2c717b18d3 Don't concatenate two strings together as an argument for t() or t2();
the l10n_scanner cannot parse it properly and drops those from the
localization list.  Fixes ticket #1284.
2010-08-29 20:04:02 -07:00
Bharat Mediratta
663f079e85 Properly handle the case where the album_cover_item_id points to an
invalid (probably deleted) item.  Fixes ticket #1238.
2010-07-22 14:08:08 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
c050acf30a Fix lots of warnings that pop up when we're in E_STRICT mode. They're
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
2010-01-31 16:07:41 -08:00
Tim Almdal
a11bf29507 Fix for ticket #972 and more. In Kohana 2.4, ORM::delete_all ignores any where
clauses and deletes all the entries in the table unless an array of id's are
passed as the parameter.  This fix used the Database_builder to specify any where
conditions. Thanks psvo for find the first one. :-)
2010-01-09 23:57:16 -08:00
Bharat Mediratta
5a7449f315 Update more database calls. 2009-12-06 19:51:25 -08:00
Bharat Mediratta
d2cb217e20 Convert more database calls over to the new format
- admin/maintenance page loads, the rebuild thumbs/resizes task works
- Fixed up some conversion bugs in the Cache driver
2009-12-02 00:34:34 -08:00
Bharat Mediratta
b9a0e09637 Kohana::config_xxx() is now Kohana_Config::instance()->xxx 2009-11-26 21:14:43 -08:00
Bharat Mediratta
1fd0e14359 Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta
0121bfd585 ORM::orderby -> ORM::order_by 2009-11-25 19:26:52 -08:00
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
294215258a Include the graphics_toolkit_path from the advanced settings in the path when searching for the graphics toolkits directories. Fixes ticket #639 2009-10-30 10:31:47 -07:00
Tim Almdal
b35051ff6f Move the graphics::rotate to gallery_graphics::rotate to be consistent with the other gallery graphics functions. 2009-10-06 18:30:08 -07:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Chad Kieffer
e1e8904e4a Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's and classes in the login/reset password dialog. 2009-09-30 22:49:36 -06:00
Tim Almdal
467b74c310 This path requires the upgrader to be run and applies the following changes:
* moves the composite method back into core
* requires that the operation be fully qualified i.e. gallery_graphics::resize
* caches the graphics rules on each request
2009-09-27 15:24:51 -07:00
Tim Almdal
e204e18b3c Refactor the graphic rules processing to accomplish 2 goals: First separate the grapics library from module supplied rules and secondly, allow for modules to provide new processing rules callbacks. graphics::generate will now look for <module_name>_graphics::<rule> methods. 2009-09-24 20:28:26 -07:00
Bharat Mediratta
9237ab9bc1 Change graphics::generate() API so that it doesn't return a boolean,
instead it throws an exception if there's a problem.  The normal case
for graphics::generate is that it's going to succeed.  It'll only fail
if something un-handleable went wrong, so just use the resulting
exception.
2009-09-02 15:29:00 -07:00
Bharat Mediratta
b9293755c0 Deal with the aftermath of adding sharpen() calls. Since GD does not
support it, this causes crashes as soon as you try to use it, which
breaks a bunch of our tests.  Also, give the user some idea that
sharpen() is missing in the UI.  Fixes #689.
2009-09-02 11:57:20 -07:00
Andy Staudacher
8312eb116e XSS review fixes (mostly adding missing html::mark_clean()) calls. 2009-08-31 02:12:01 -07:00
Andy Staudacher
ddb84c84e1 Rename mark_safe() to mark_clean() 2009-08-31 00:42:18 -07:00
Andy Staudacher
e7f5e0a9a3 Merge commit 'upstream/master'
Conflicts:

	modules/gallery/views/l10n_client.html.php
	modules/organize/views/organize_tree.html.php
	modules/server_add/helpers/server_add_event.php
2009-08-30 18:27:40 -07:00
Andy Staudacher
effccfd41d Change all instances of SafeString::of_safe_html() to html::mark_safe() in views. 2009-08-30 07:00:56 -07:00
Bharat Mediratta
878b9c91b2 Remove try/catch in resize() since that will swallow any exceptions
that we generate when resizing.
2009-08-29 16:38:53 -07:00
Andy Staudacher
b4b638be44 Undo url helper changes - url methods no longer return a SafeString.
Adding SafeString::of_safe_html() calls where urls are passed as parameters to t() and t2().
2009-08-29 16:28:30 -07:00
Tim Almdal
0aceba6f48 Fix for ticket #628:
1) increased gallery module version to 11
2) added image_sharpened parameter to the gallery module
3) sharpen all resizes.
2009-08-29 15:20:27 -07:00
Bharat Mediratta
c9f5000e65 Improve the graphics toolkit detection code so that properly
identifies situations where its restricted by open_basedir.

We now track more informatoin about the toolkit including the version
and any errors we encountered while doing the detection so that we can
provide more info downstream.  This makes graphics::detect_toolkits()
a little heavier, but that's ok because it should not be called very
often.

In the process, refactor the controller and view hierarchy so that
it's a little more straightforward in the code.

Fixes ticket #616.
2009-08-08 20:31:16 -07:00