summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_task.php
AgeCommit message (Collapse)Author
2013-05-15Follow-on to #2069 - Decrease stack size of MPTT rebuild task.shadlaws
This reduces the likelihood that we'll hit a limit with gargantuan galleries. --HG-- extra : source : c4a118d43145a2a4ec9b934d3aebe8f9458bcf07
2013-05-14#2069 - Change "Fix your Gallery" task go faster and be more comprehensive.shadlaws
- optimize MPTT pointer rebuilding for leaf nodes (i.e. non-albums). - reverse order_by to try and preserve existing tree ordering. - reset item level while we're here. - use "$stack[] = 123" instead of array_push($stack, 123) since it's faster. --HG-- extra : source : 297e4c0eccc5a7940224ff8e908b366e83017354
2013-02-15Follow-on to 7bdccade98e76df3a7830bc45bc42321a77c709a to excludeBharat Mediratta
directories for now.
2013-02-15Follow-on to 7bdccade98e76df3a7830bc45bc42321a77c709a - point out that there'sBharat Mediratta
duplicated code in gallery_event.
2013-01-26Merge pull request #104 from shadlaws/fix_1966Bharat Mediratta
#1966 - "Fix your Gallery" shows 60/59 items completed.
2013-01-26#1966 - "Fix your Gallery" shows 60/59 items completed.shadlaws
- Fixed counter in gallery_task::fix that was often one too many. For FIX_STATE_RUN_MISSING_ACCESS_CACHES, changed this: $stack = explode(" ", $task->get("stack")); To this: $stack = array_filter(explode(" ", $task->get("stack")));
2013-01-26#1946, 1947 - Make altered names/slugs more user-friendly, make ↵shadlaws
conflict-finding code check filenames with no extensions - Reduced from four places that alter names/slugs to two (one to populate empty slugs, one to handle conflicting names/slugs). - For empty slugs, fill with generic human-readable name (e.g. "photo") instead of random value. - For conflicting names/slugs, add suffix that's sequential (e.g. "-01"), only using random after 99 conflicts. - Made conflict-finding code check filenames with no extensions. - Renamed _randomize_name_or_slug_on_conflict to _check_and_fix_conflicts. - Added unit tests. Also cleaned up existing unit tests to reflect new logic and removed a redundant test. - Added installer logic to correct existing items now considered in conflict. - Revised gallery_task to look for duplicate names based on new criteria.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-07-21Refill the path and url caches in the item model at the end of this task. ↵Bharat Mediratta
Fixes #1896.
2012-07-21Fix the access_cache rebuilding code to not load all missing access caches ↵Bharat Mediratta
into the stack, if you're missing enough it'll blow the stack (like, if you truncate the access_caches table). Fixes #1895.
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2012-02-06Add tags for all Cache::instance()->set calls that don't have one.Bharat Mediratta
Fixes #1818.
2011-01-21Update copyright to 2011.Bharat Mediratta
2010-12-28Use db::expr instead of "new Database_Expression". Resolves #1560.Bharat Mediratta
2010-11-21Shuffle up the way we figure out which image to rebuild next so thatBharat Mediratta
multiple concurrent tasks actually work in parallel and don't stomp on each other. Fixes #1498.
2010-10-02Detect the case where there are no more broken images and skip to the end. ↵Bharat Mediratta
Fixes #1414.
2010-09-13When moving a single item, just copy its permissions from its parentBharat Mediratta
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-12LOWER() the slug and name in the find_dupes functions since DISTINCTBharat Mediratta
is case sensitive, but our dupe validation is not. Fixes ticket #1367.
2010-08-29Don't concatenate two strings together as an argument for t() or t2();Bharat Mediratta
the l10n_scanner cannot parse it properly and drops those from the localization list. Fixes ticket #1284.
2010-08-14Rebuild access_caches rows if they're missing, as necessary. Fixes ticket ↵Bharat Mediratta
#1289.
2010-08-04Add docs reflecting that we may skip some items that have invalid parent_idsBharat Mediratta
2010-08-01While we're cleaning up albums, also find any cases where we have anBharat Mediratta
album_cover_item_id that points to an invalid item.
2010-08-01Make maintenance mode a variable instead of a config. Then createBharat Mediratta
links on the Admin > Maintenance page to allow you to turn it on and off. This should be efficient since we cache all vars and look them up on every request anyway. This also allows us to have the Fix task enable maintenance mode while it's running which greatly reduces the chances that somebody will come along and hork the database while we're tinkering with MPTT pointers. Fixes ticket #1259.
2010-07-29Add recovery code for dupe slugs and dupe names to the general purpose FixBharat Mediratta
task. Fixes ticket #1260.
2010-07-28Combine the Fix MPTT and Fix Permissions tasks into one magical fix-itBharat Mediratta
task.
2010-07-25Add a new maintenance task that resyncs album .htaccess files withBharat Mediratta
database access intents. Use this to fix up .htaccess files after you relocate your Gallery. Fixes ticket #1252.
2010-07-21Null out relative_path_cache and relative_url_cache after we updateBharat Mediratta
the pointers in case the hierarchy was adversely affected by actions when the MPTT pointers were desynced. Fixes ticket #1235.
2010-04-04Move the "Fix MPTT" task from the rescue module into the main GalleryBharat Mediratta
module.
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-02-21Performance improvement: Load all translations of a locale as one serialized ↵Andy Staudacher
array from the Cache. Until now, we loaded hundreds of translation messages row by row, and unserializing one by one at bootstrap time. That amounted to a significant percentage of the complete request time. This approach is more than 10x faster.
2010-02-01Update the description to reflect we are only removing "expired" files.Tim Almdal
2010-02-01Correct the internationalization of the status message.Tim Almdal
2010-01-31Fix lots of warnings that pop up when we're in E_STRICT mode. They'reBharat Mediratta
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-27Convert __toString() to use (string) cast instead.Bharat Mediratta
2010-01-26Add a maintenance task that will clear the expired files (older than 2 ↵Tim Almdal
weeks) from var/logs and var/tmp. Fixes ticket #982
2010-01-22Change "fetch translations" task to fetch them in batches.Andy Staudacher
The request limit was in place already, but the client didn't respect it before, leading to unhappy users in case they had lots of 3rd party modules installed, or more than 2-3 locales enabled. This is all taken care of now.
2009-12-02Convert more database calls over to the new formatBharat Mediratta
- admin/maintenance page loads, the rebuild thumbs/resizes task works - Fixed up some conversion bugs in the Cache driver
2009-11-25Preliminary work to cut over to Kohana 2.4Bharat Mediratta
- 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-16Store the directory, files and translation cache in the gallery3 cache ↵Tim Almdal
instead of trying to store it in the task. It is possible with lots of modules and lots of incoming translations to go beyond the 64K limit in the task context. Possible fix for #886.
2009-10-27When rebuilding dirty images, start a batch on initialization and stop it ↵Tim Almdal
when the task is complete. Fixes ticket #670
2009-09-27Clean up the task initialization for rebuild thumbs and resizes.Tim Almdal
2009-09-24Refactored the rebuild_dirty_images handler to simplify the counting and end ↵Tim Almdal
processing. It was getting all confused with trying to figure out the completed and remaining. Now on initiation it sets the total images that are dirty and then counts the completed until it equals the total, then exits. Fixes ticket #771
2009-09-02Change graphics::generate() API so that it doesn't return a boolean,Bharat Mediratta
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-08-29Update all code to use helper method html::clean(), html::purify(), ... ↵Andy Staudacher
instead of SafeString directly.
2009-08-29Refactor all calls of p::clean() to SafeString::of() and p::purify() to ↵Andy Staudacher
SafeString::purify(). Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-07-19Remove excess success logging. In the rebuild images case, it canBharat Mediratta
make a huge log file. In the l10n_client case, it's not really necessary to know that level of detail and it makes for a weird API.
2009-07-08Add task logging to the Update translationsTim Almdal
2009-07-08Added task logging to the Rebuild Images task.Tim Almdal
2009-07-03Ignore lib/ folders in l10n_scanner task.Andy Staudacher
1. Because it makes sense. 2. As a quick fix - For some reason it wouldn't work properly anymore now with the HTMLPurifier lib
2009-06-04Skip over busted images when rebuilding. Change graphics::generate()Bharat Mediratta
to return true/false on whether or not it could rebuild the image properly, then track the broke images in the task and ignore them. Fixes ticket #344.