summaryrefslogtreecommitdiff
path: root/core/models
AgeCommit message (Collapse)Author
2009-05-27Restructure things so that the application is now just another module.Bharat Mediratta
Kohana makes this type of transition fairly straightforward in that all controllers/helpers/etc are still located in the cascading filesystem without any extra effort, except that I've temporarily added a hack to force modules/gallery into the module path. Rename what's left of "core" to be "application" so that it conforms more closely to the Kohana standard (basically, just application/config/config.php which is the minimal thing that you need in the application directory) There's still considerable work left to be done here.
2009-05-20Add a cache buster to thumbnail urls, using the item update time.Bharat Mediratta
Fixes ticket #121.
2009-05-16Item_Model::rename() cannot accept new filenames that contain "/"Bharat Mediratta
2009-05-16Implement Item_Model::rename(), with unit tests.Bharat Mediratta
2009-05-14Introduce a relative_path_cache column in the items table. This letsBharat Mediratta
us avoid doing lots of MPTT lookups to find the parent path when we're trying to generate thumbnails, etc. Invalidate the cache at all the right times. This greatly reduces our query count on album page views. This fixes ticket #40.
2009-05-13Gee it's May already. Update copyright to 2009.Bharat Mediratta
2009-05-12Simplify delete()Bharat Mediratta
2009-05-12fix comment typo.Bharat Mediratta
2009-05-11Add has_thumb() public API methodBharat Mediratta
2009-05-11Avoid using ORM_MPTT::parents() in relative_path() so that we're notBharat Mediratta
calling ORM just to get paths. This is a 10x performance increase.
2009-05-10Disable default sorting for performance. (thanks Romain LE DISEZ)Bharat Mediratta
2009-05-09Fix for ticket #255Tim Almdal
2nd iteration
2009-05-09Fix for ticket #255Tim Almdal
2009-05-02Move make_album_cover and remove_album_cover out of Item_Model andBharat Mediratta
into the core helper. Clean up interactions so that when we remove an album cover we pick a new one, or clean out the old album cover if there are no other choices.
2009-05-02Clean up API to be organized around the functionality it provides, not the ↵Bharat Mediratta
feature its provided for.
2009-04-29Refactor the creation and removal of the album covers intoTim Almdal
make_album_cover and remove_album_cover methods in Item_Model. Usage: $photo->make_album_cover() $album->remove_album_cover()
2009-04-29Reset the parent thumbnail in Item_Model::delete instead of where theTim Almdal
delete was happening. This will insure that it is consistently done for all deletes and we don't have to remember to replicate the code.
2009-04-29Move the module::event("before_item_delete") into theTim Almdal
Item_Model::delete method. This will insure that it will get called for all events. Currently it is not being called for children of an album when the parent album is deleted.
2009-04-28Change _adjust_thumb_size to adjust_thumb_size and make public so weTim Almdal
can access if from organize
2009-04-24Fixed typo in comment, added docblock.Chad Kieffer
2009-04-22Remove the negative weighting for albums. The are now positionedTim Almdal
based on the insertion order.
2009-04-09Missed a closing para )Tim Almdal
2009-04-09Change the weight for albums from zero, which could give usTim Almdal
indeterminate ordering, so that ablums are initially shown first.
2009-04-09Clean up delete code as per Bharat's noteTim Almdal
2009-04-09Merge the micro_thumb_tag method into thumb_tag and add a thirdTim Almdal
parameter to indicate that a micro thumb is being generated
2009-04-08Fixes issues with Server Add:Tim Almdal
1) Fixes Ticket #208 2) Fixes Ticket #190 3) Fixes an unticketed issue where two items could collide when creating the thumbnail and/or resize. For example, loading a.flv and a.jpg would have generated the same thumbnail image. This change adds a random value to the name to avoid conflicts. 4) Added item::__set() to clear the relative path if the name changes
2009-04-05Add a weight column to the items model. Change the album ordering toTim Almdal
use this as the default instead of id. This prepares the way for manual reordering in the organize functionality.
2009-03-27Add a method to create a micro_thumb that is centered vertically inTim Almdal
its container (initially used for organize album view)
2009-03-26Update comments to reflect that the results of item::children orTim Almdal
item::descendants uses the specified sort order
2009-03-25untabifyBharat Mediratta
2009-03-24Change the item model so it will actually delete all the file systemTim Almdal
objects when an item is deleted.
2009-03-23Fix for ticket #168: Set a default value for extra_attrs on the ↵Tim Almdal
Item_Model::thumb_tag()
2009-03-20Don't divide by zero in thumb_tag if there's no thumbnailBharat Mediratta
2009-03-20Restore $extra_attrs in img tags. Roll back to using .gThumbnail in quick pane.Chad Kieffer
2009-03-18Fix for ticket #155. Delete the item record before unlinking theTim Almdal
files.
2009-03-16Oops, I used the wrong resize variables in my last change.Bharat Mediratta
2009-03-16Remove unnecessary __get() functionBharat Mediratta
2009-03-15Move references to "album" out of ORM_MPTT since it's supposed to beBharat Mediratta
implementation agnostic.
2009-03-14Don't use html::image because it forces absolute urls, which we don't want.Bharat Mediratta
2009-03-14Default thumb/resizes to relative urls.Bharat Mediratta
2009-03-09Override the ORM_MTTP::children and ORM_MTPP::descendants methods inTim Almdal
the item model and always pass the orderby fields. This insures that all children or descendant calls will respect the album sort order.
2009-03-09Change Item_Model::get_position to respect the sort order. This alsoTim Almdal
forced the next/prev buttons in album navication to respect the sort order as well.
2009-03-09More tasks cleanup.Bharat Mediratta
Don't join through to the users table; that won't work in embedded mode. Instead, add Tasks_Model::owner() that calls user::lookup() and refer to the object directly in the view. Add Admin_Maintenance:remove_finished_tasks() so that we can easily do old task cleanup. Hide Running / Finished sections if there aren't any running or finished tasks.
2009-03-09Make the description a text column so that we can handle much largerBharat Mediratta
descriptions.
2009-03-05Fix for ticket #114 Permissions seem to be ignoredTim Almdal
2009-03-04Allow url() to return absolute urlsBharat Mediratta
2009-02-27* Refactor task management methods from admin_maintenance.php toTim Almdal
task.php * Added a owner_id field to the task database * Modified the admin maintenace to show the owner of the task <<**** Requires a reinstallation of core ****>>
2009-02-25Add support MP4 movies also. Flowplayer supports them and can streamBharat Mediratta
them using the h264streaming plugin. Everything else is a fairly minor change.
2009-02-24Fix for ticket #98.Tim Almdal
The problem was that item::delete was deleting the parent album
2009-02-22If the album_cover_item_id points to a missing item (unlikely but possible) ↵Bharat Mediratta
just treat it like it was missing and continue