summaryrefslogtreecommitdiff
path: root/modules/organize/controllers
AgeCommit message (Collapse)Author
2010-01-27Convert __toString() to use (string) cast instead.Bharat Mediratta
2009-12-25Convert some database callsBharat Mediratta
2009-12-21Updates for the latest version of Kohana 2.4:Bharat Mediratta
1) Controller::$input is gone -- use Input::instance() now 2) Handle new 'database.<default>.connection.params' parameter 3) Handle new 'cache.<default>.prefix' parameter
2009-09-15Controller auth / CSRF fixesAndy Staudacher
2009-09-14Change the variable to to resolve ticket #769Tim Almdal
2009-09-10Rename ORM_MPTT::is_descendant() to ORM_MPTT::contains() to make theBharat Mediratta
API a little clearer. Write a test for it, too.
2009-09-10Rename $album to $target in move_to()Bharat Mediratta
2009-09-10A better fix for #741... the original problem was that the source and album ↵Tim Almdal
variables were reversed
2009-09-10Changed the check in organize_Controller::move_to:Tim Almdal
1) check that target and source are not the same. 2) check that the source is not already a child of the target (use to be a descendant) Fixes #741.
2009-08-30Don't try to move an item into its own descendant hierarchy. Just leave it ↵Bharat Mediratta
out of the move for now.
2009-08-30Manage the selection so we don't automatically select an albumBharat Mediratta
whenever we expand a tree.
2009-08-30Precalculate the organize tree based on the selected album and renderBharat Mediratta
it right away while still allowing incremental tree loading.
2009-08-29Change the organize tree to expand/collapse. It doesn't properly openBharat Mediratta
up to the album that you're viewing, and if you move a photo to a different album it'll reload the entire album tree.
2009-08-29Fix a bug where organize doesn't properly generate the tree at the root album.Bharat Mediratta
2009-08-29Get rid of the task infrastructure. The multiple requests greatlyBharat Mediratta
slow down simple operations. We may run into problems with more complex operations, but let's only add tasks into the mix when it's clear that we need them.
2009-08-29Major refactor of organize:Bharat Mediratta
* Clean up naming conventions for variables in the controller so that we specifically refer to albums with $album_id, etc. * Move complexity for drawing tree out of the controller and into the view. * Simplify task definitions to get rid of extraneous text * Change __PLACEHOLDERS__ to clearly define which is the album and which is the item that we're moving before/after * Remove as many CSS ids as we can from the tree view to keep things simple
2009-08-28Display the sort order in the Organize dialog, and allow users toBharat Mediratta
change the sort order on the fly.
2009-08-28Fix a couple of off-by-one errors.Bharat Mediratta
2009-08-28Refactor rearrange_task_handler to have a more linear flow.Bharat Mediratta
2009-08-28Clean up in preparation for some refactoring.Bharat Mediratta
2009-08-17This patch adds some security to the organize dialog.Tim Almdal
1) If images are dragged from the content pane and dropped on a branch in the tree that the user only has view priviledges, then the drop is cancelled and the images are reverted. 2) The user cannot click on a branch, to which they only have view priviledges, the content pane does not change to the new album
2009-08-17remove the batch start/stop and replace the ORM update of the weight, with a ↵Tim Almdal
direct sql update. This bypasses the gallery3 event mechanism. Fire a album_rearrange event when the rearrangement is complete
2009-08-17Change back to using the ORM to update the child weight, but use the ↵Tim Almdal
batch::start() method so notifications are queued
2009-08-17Fix the performance problem related to setting the child weight, by ↵Tim Almdal
bypassing ORM and generating the sql directly.
2009-08-17The rearrange functionality works. but it is slower than shit. I've left ↵Tim Almdal
the debug statements in until we can solve this issue.
2009-08-16In this patch, drag now works to the album tree, but the progress bar is notTim Almdal
showing. As well fixed a problem where selectable single clink no longer worked when the album was reloaded.
2009-08-12Implement the first part of drag functionality. Having trouble getting ↵Tim Almdal
visual feedback of the drop position between thumbnails, so this commit provides a checkpoint for trying various options
2009-08-06Further streamline the code.Bharat Mediratta
Organize_Controller: * Remove unnecessary constants * Rename index() to dialog() * Simplify _get_micro_thumb_grid organize.js: * Move sizing code in here from organize_dialog.html.php organize_dialog.html.php: * Move CSS and JS links in here so that we only load them when we need them. * Move sizing code into organize.js organize_thumb_grid.html.php: * Move pagination logic in here, since it's view centric * Collapse the css class determination code and inline it
2009-08-06Tighten up the code by loading all the albums in the tree at once, removingTim Almdal
the events to populate the button bar.
2009-08-05Change to use the new children and children_count APITim Almdal
2009-08-05Revert "Revert "Enable the expand/collapse of branches by clicking on the ↵Tim Almdal
plus/minus"" This reverts commit e37526f94df74a52a9cf36f0a5a5e641958ebbb3.
2009-08-05Revert "Revert "Checkpoint the organize module rewrite. At this point, it ↵Tim Almdal
doesn't really do"" This reverts commit 397468c47b8fc3fefeb54ff19a73980ed1dd8c20.
2009-08-05Revert "Checkpoint the organize module rewrite. At this point, it doesn't ↵Tim Almdal
really do" This reverts commit a25f08d433d504a53763feb358a1aa7f5f798de6.
2009-08-05Revert "Enable the expand/collapse of branches by clicking on the plus/minus"Tim Almdal
This reverts commit 869c3de9612a598dae0ce400991bdbe173a2decc.
2009-08-05Enable the expand/collapse of branches by clicking on the plus/minusTim Almdal
icons. Branches with no albums, will not have an icon.
2009-08-03Checkpoint the organize module rewrite. At this point, it doesn't really doTim Almdal
anything, but get the dialog up, populate the album tree and intelligently populate the micro thumb grid. Still to do: 1) get the microthumbs laided out ptoperly 2) expand and collapse functionality in the album tree 3) use the album tree to change the content of the micro thumb grid 4) Actually add some functionality At the moment, it supports a callback "" to allow modules to add icons to the organize drawer label. The close button is added outside of this framework as it will always be last.
2009-07-21Fix some consistency in text.Shai Ben-Naphtali
This fixes ticket #546 Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-16Second non-trivial change to the event code. We now publish modelBharat Mediratta
related events from within the model handling code. The only exception to this currently is item_created which is challenging because we have to save the item using ORM_MPTT::add_to_parent() before the object itself is fully set up. When we get that down to one call to save() we can publish that event from within the model also.
2009-07-16Non-trivial changes to the event handling code:Bharat Mediratta
1) The item_updated event no longer takes the old and new items. Instead we overload ORM to track the original data and make that available via the item. This will allow us to move event publishing down into the API methods which in turn will give us more stability since we won't require each controller to remember to do it. 2) ORM class now tracks the original values. It doesn't track the original relationships (no need for that, yet) 3) Added new events: item_deleted group_deleted user_deleted
2009-07-03Split the clean method into two clean and purify. clean is a light weightTim Almdal
approach using html::specialchars and purify uses HTMLPurifier to intelligently cleanse the output fields. Use purifier for text and title fields where it is likely that a user would enter html to format their data.
2009-07-01Fix a bunch of XSS vulnerabilities turned up by manual inspectionBharat Mediratta
using the checklist in ticket #385.
2009-06-03Sanitize all data we return via json_encode() to guard against XSS andBharat Mediratta
other data leaks.
2009-06-01Security pass over all controller code. Mostly adding CSRF checkingBharat Mediratta
and verifying user permissions, but there are several above-the-bar changes: 1) Server add is now only available to admins. This is a hard requirement because we have to limit server access (eg: server_add::children) to a user subset and the current permission model doesn't include that. Easiest fix is to restrict to admins. Got rid of the server_add permission. 2) We now know check permissions at every level, which means in controllers AND in helpers. This "belt and suspenders" approach will give us defense in depth in case we overlook it in one area. 3) We now do CSRF checking in every controller method that changes the code, in addition to the Forge auto-check. Again, defense in depth and it makes scanning the code for security much simpler. 4) Moved Simple_Uploader_Controller::convert_filename_to_title to item:convert_filename_to_title 5) Fixed a bug in sending notification emails. 6) Fixed the Organize code to verify that you only have access to your own tasks. In general, added permission checks to organize which had pretty much no validation code. I did my best to verify every feature that I touched.
2009-05-27Update all references to the core application to now point to theBharat Mediratta
gallery module. This type of mass update is prone to some small bugs.
2009-05-26Since organize is now in the preview stage and will probably beTim Almdal
rewritten by beta2, pull all of its "tenticles" back into itself and out of core or tags module.
2009-05-18This takes us the next step closer to providing bulk edit. We stillTim Almdal
can't edit, but we are getting closer :-). This change sets up a framework for modules to contribute edit panels to the organize drawer. Currently implemented General (albums and photos), Sort Order (albums only) and Manage Tags
2009-05-13Gee it's May already. Update copyright to 2009.Bharat Mediratta
2009-05-02Remove angled ends of edit drawer handle.Chad Kieffer
2009-05-01Set organize messages to use existing gMessage, added album cover message.Chad Kieffer
2009-04-29Change album cover functionality addedTim Almdal