Commit Graph

122 Commits

Author SHA1 Message Date
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
96ad7789c8 Follow-on to 7bdccade98 to exclude
directories for now.
2013-02-15 19:17:34 -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
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
shadlaws
f83ed5f871 #1982 - Add placeholder for albums with no album cover.
- Added missing_album_cover.jpg placeholder image.
- Modified the graphics helper to use it.  Calling graphics::generate will copy it.
- Modified item::remove_album_cover and gallery_event::item_created to run graphics::generate.
- Added unit test to Graphics_Helper_Test.
2013-01-31 17:18:39 +01:00
Bharat Mediratta
075b95f0ed Actually disable the "make album cover" option when the item is already the album cover. Fixes #1979. 2013-01-30 21:18:26 -05:00
shadlaws
cf07742595 #1968 - Improve album cover generation/removal/etc.
- Added stanza to Item_Model::save that handles when cover id is null.
- Added logic to graphics::generate to copy/convert album cover thumbs from their item thumbs to ensure they're always jpg, and eliminate the possibility that we copy/convert a dirty thumb.
- Redirected other places in code where we want to do one of the above two things to use these two functions instead (gallery_event::item_updated_data_file, item::make_album_cover, item::remove_album_cover).
- Improved validation in Item_Model so only albums can have covers and all covers must be non-albums.
- Added unit tests to Graphics_Helper_Test.
2013-01-30 01:07:36 +01:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
e722e5d5d4 Fix missing date.timezone which results in a crash on startup in I18n
code.  Fill in missing field and log it 25% of the time. Fixes #1853.
2012-05-07 11:38:51 -07:00
Bharat Mediratta
3fe3c09ec3 Use html::anchor consistently. Fixes #1851. 2012-05-06 09:45:04 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Chad Kieffer
e90493aab3 Translate user Web Site label. Link web site on user profile page. 2011-03-02 21:11:49 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
92f66058d3 Revert "Warn admins after login if their PHP install has the"
This reverts commit 612ddd7050.
2011-01-08 16:58:52 -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
Bharat Mediratta
612ddd7050 Warn admins after login if their PHP install has the
session.use_trans_sid feature enabled, since this will cause random
logouts.  Partial fix for #1316.
2010-12-18 11:55:04 -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
1a0d76c43e When moving a single item, just copy its permissions from its parent
album.  This is totally legal since an items permissions must be the
same as its parent's, and it's much faster for large installs where
a complete recalculation can be very costly.  Should fix #1360.
2010-09-13 22:23:09 -07:00
Bharat Mediratta
19750cb0d5 When deleting items, choose the first *viewable* peer as the album
cover.  Normally, all items are equally viewable, but in our unit
tests we occasionally have the scenario where peers have different
viewability settings which is internally consistent although only
possible if you set the fields manually.
2010-09-13 22:02:19 -07:00
Bharat Mediratta
b4fb11f8d5 Only call $theme->item() if we're in a non admin theme. 2010-09-11 21:40:57 -07:00
Bharat Mediratta
bfd92ac6f2 Use $theme->item() instead of $theme->item, otherwise
isset($theme->item) may return true even when we don't have an actual
Item_Model in there.
2010-09-11 21:38:46 -07:00
Bharat Mediratta
fa1fe47b6a Use the absolute site url when logging out of the admin site else we
wind up with weird url doubling effects.  Fixes ticket #1342.
2010-09-06 22:13:41 -07:00
Bharat Mediratta
23b566e592 One more adjustment for ticket #1216. The packaging process forces
the default email address for admin to be unknown@unknown.com and when
that happens the gallery_event::user_updated() event listener fires
and sets the default values.  This is hard to work around, so let's
just roll with it and use unknown@unknown.com as our default placeholder.

So now, if an admin sets their email address and the current values
are unknown@unknown.com we adopt the admin's email address for the
site's mail_from/reply_to fields.
2010-09-01 23:52:19 -07:00
Bharat Mediratta
7477f0119c Explain wtf we're doing in user_updated. 2010-09-01 23:39:01 -07:00
Tim Almdal
04f6646b06 Hopefully the third and final patch for #1216. Set the default from and reply-to addresses to an empty string. The first time the user model is saved, set the sendmail from and reply-to addresses. Requires an update to gallery version 38. 2010-09-01 23:19:43 -07:00
Tim Almdal
1f621d9827 Refine the patch for #1216. If the admin user changes their email address update the sendmail from and reply_to fields in advanced settings. Also change this if the identity provider has changed. 2010-09-01 21:24:41 -07:00
Bharat Mediratta
04add75f6f Get rid of the move dialog and move option. Instead, replace it with
a call to Organize with the appropriate album open.  I have not yet
figured out how to get the SWF code to highlight the active image, but
that's coming.  Partial fix for #1204.
2010-08-22 00:27:24 -07:00
Bharat Mediratta
dfb095a262 Add the ability to replace the source data file in Item_Model::save().
Refactor the rotate code in Quick_Controller to replace the data file,
and then have gallery_event::item_updated_data_file() pick up after
the change is saved, rebuild the image and handle album covers.  This
is much more portable than before and it will allow any mechanism (eg:
REST) to replace the source image.
2010-08-07 22:18:28 -07:00
Bharat Mediratta
9e9eed1187 Oops! Proper fix for #1201. My last fix just redirected back to the
main site, and didn't actually log you out.
2010-07-20 06:42:20 -07:00
Bharat Mediratta
86a91c11cf Redirect users away from admin to the main site if you click logout on
the admin dashboard.

Fixes ticket #1201
2010-07-15 12:51:35 -07:00
Bharat Mediratta
fe2881a22a Rename Flash_Uploader to just Uploader. Modules that want to replace
this will just replace the controller.  This makes overriding that
much easier in the future.
2010-07-15 12:37:44 -07:00
Bharat Mediratta
eb19192c4e If the target of an item move has no album cover, make the newly moved item the album cover.
Fixes ticket #1196.
2010-07-10 18:51:57 -07:00
Bharat Mediratta
b20f9123dc Wrap album deletes in a batch so that we can handle lots of cascading
deletes in bulk.  This lets us avoid the problem where we continually
choose and delete album covers which makes deletes really slow.  It
probably also avoids huge amounts of notification emails (untested).

Fixes ticket #1190.
2010-07-10 18:25:23 -07:00
Bharat Mediratta
307e47c3d0 Pass along the from_id when editing albums in the context menu, and
also pass it along in the form creation code.  This fixes ticket #1183.
2010-07-10 11:45:45 -07:00
Bharat Mediratta
60126adc7e In the site menu, say "Delete album", "Delete photo" or "Delete movie"
as appropriate for the item type.  Fixes ticket #1175.
2010-07-04 20:40:50 -07:00
Bharat Mediratta
0d424a635d When we delete an item, make sure that we scrub it from any other
items that may have it in the album_cover_item_id column.  Fixes ticket #1172.
2010-07-03 14:25:33 -07:00
Bharat Mediratta
d82863421d Rename "simple_uploader" to "flash_uploader" to make room for an HTML
uploader.
2010-06-20 21:10:22 -07:00
Bharat Mediratta
c026da85cd Use "continue_url" instead of "continue" for consistency with the
reauth code.
2010-06-12 15:10:34 -07:00
Bharat Mediratta
63d95087bf Stop trying to parse the continue url in the logout controller because
it requires us to reproduce a bunch of complex routing logic.
Instead, just have the logout link generating code generate a link
that's visible to guests.
2010-06-12 13:35:12 -07:00
Bharat Mediratta
1d91e1b2dc Don't show the rotate links if the active user can't edit the photo. Fixes ticket #1157. Thanks to psvo. 2010-06-06 23:19:02 -07:00
Bharat Mediratta
1240878df0 Fix-ups for d98b85f7d3
- Pass the CSS selector of the active image in as an arg to site_menu
  so that quick operations know what they're operating on.
- Change the ids from g-{photo,movie}-id to the generic g-item-id
- Initialize ajax handlers for site menu on the photo and movie page
- Drop the movie context menu, it's now in the site menu
2010-05-14 16:55:15 -07:00
Chad Kieffer
163dd0eb93 Merge branch 'master' of github.com:gallery/gallery3 2010-05-14 17:16:22 -06:00
ckieffer
d98b85f7d3 Drop context_menu for wind's photo/resize view. Move photo edit options to the site_menu. 2010-05-14 17:14:34 -06:00
Bharat Mediratta
9affa8ebbd Pick a new album cover when the photo that's the current cover is
deleted.  Fixes ticket #1083.
2010-05-10 22:11:59 -07:00
ckieffer
44753c5249 Deleted extra CSS class assignment for context_menu delete option. 2010-05-08 15:05:56 -06:00
Bharat Mediratta
6429110cd0 Merge branch 'master' of git://github.com/fpaterno/gallery3 2010-03-05 21:25:22 -08: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
Florent Paterno
e4ed7e983d Fix bug #1015 : repeated ids are prohibited 2010-03-01 17:23:56 +01:00
Andy Staudacher
6cbe0f78aa Revert "Fix Kohana's internal cache for Gallery's usage pattern."
This reverts commit 5ddd7c9677.
2010-02-21 21:07:55 -08:00
Andy Staudacher
5ddd7c9677 Fix Kohana's internal cache for Gallery's usage pattern.
Adds a core.internal_cache_read_only config variable to Kohana's internals.

Kohana's internal_cache for find_file wasn't working in Gallery because the cache would be emptied on each request after reading it from disk and before most lookups would run.
 1. Bootstrap sets initial core.modules (= include path): forge, kohana23_compat, gallery.
 2. Kohana::setup() loads find_file cache from disk.
 3. Gallery loads list of active modules and themes, and updates the core.modules value (=include path), which forces the internal find_file cache to be empties (which makes sense).
 4. Request processing starts, and thus 80% of all Kohana::find_file() triggered  is_file() invocations start off with an empty find_file cache.

In the case of my small Gallery installation, we're talking about 3100 is_file() invocations per request with or without internal_cache enabled. With this fix, this number is down to 800 invocations.

The basic idea is that we treat the cache as read only and don't write any (possibly dirty) values to it in memory until we're sure that the include path won't change later on in the request processing. Once we know the list of active modules and themes, we can update core.modules and finally flip the read-only state of the cache and start writing to it.
2010-02-21 20:04:06 -08:00