summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
AgeCommit message (Collapse)Author
2009-07-26Changed access::user_can to force the owner of an item to haveTim Almdal
view permission on the parent. Added a whitelist of allowable owner permissions. If the requested permission is view and the user requesting access is the owner, check that they have view permission to the parent.
2009-07-25Fix for ticket #452Tim Almdal
1) Change access_Core::user_can to return true for all permissions if the owner is the specified user. 2) Change Item_Model::viewable to set the owner_id is the first view_restriction This allowed simplification of the generating the where clause to a single $this->orwhere instead of a where and an orwhere.
2009-07-25Fix for ticket #594. Forced the directory name to be required when editting ↵Tim Almdal
the album.
2009-07-25Rename columns that use reserved SQL words : items.left and items.rightRomain LE DISEZ
2009-07-23Merge branch 'master' of git@github.com:/gallery/gallery3Bharat Mediratta
2009-07-24Add tag autocomplete to the album and photo edit pop up dialogs.Tim Almdal
This required putting a wrapper view around the forms and passing this view as the parameter to the item_edit_form event. The view contains a $script variable that the modules can add script to be included in the form html when rendered as part of the ajax response.
2009-07-23Disable the album cover icon if the item is already the current album cover.Bharat Mediratta
2009-07-23Fix a typo in a commentBharat Mediratta
2009-07-23Upgrade code to migrate the ACL from integer to boolean.Romain LE DISEZ
Related to 719c59e0402464a0e2b14915f6d10218ff5d4729 (cherry picked from commit 831bf63c236fe88624470d2906729e035e9dbfc8)
2009-07-23Consistency : always use self::XXXRomain LE DISEZ
(cherry picked from commit c9017ae2f21ff8f5d745f296a636b80a30add6a1)
2009-07-23Use BOOLEAN instead of integer to describe the permissions :Romain LE DISEZ
- DENY = false - ALLOW = true - UNKNOW = null (for intent only) - INHERIT = null (for cache) Upgrade is not included for now. (cherry picked from commit 719c59e0402464a0e2b14915f6d10218ff5d4729)
2009-07-22remove an extra ->reload() that was there for testingTim Almdal
2009-07-22Add explicit unit tests for access::user_canTim Almdal
2009-07-22Use the Kohana cascading filesystem to locate resources loaded by theBharat Mediratta
theme. Because the theme comes first, this means that themes can override any module resources, at the cost that we no longer have namespacing for JS and CSS files. The only file getting used outside of this model is themes/default/screen.css which is used in the admin theme. I fixed that by copying screen.css into admin_default and renaming its screen.css to admin_screen.css. I also copied over all the images that it was referencing. Fixes tickets #48 and #539. Theme API changes: - theme_script(), theme_url() and theme_css() are no longer needed - script(), url() and css() now refer to the first matching asset in the module load path, where gallery3/lib is at the end of the path
2009-07-22bump version to "3.0 git (pre-beta3)"Bharat Mediratta
2009-07-22Duh... when I added user_can, I passed in the user, but still used the ↵Tim Almdal
groups from the session
2009-07-21Add an API method user_can that allows for checking a specific user has theTim Almdal
specified permission to the item. Changed can to delegate to this method passing in the active user.
2009-07-21Always display the option menu so that modules with options that requireTim Almdal
menu items with view permission have somewhere to hang these menu items from. If its empty it will get removed by $menu->compact()
2009-07-21The RSS link should go to the parent album when looking at photos/movies.Bharat Mediratta
Fixes ticket #566.
2009-07-20Don't let the task status message exceed the size of the status column when ↵Bharat Mediratta
there's an error.
2009-07-20Make some API changes simplify the tag editing code. We now have aBharat Mediratta
good pattern for allowing modules to add their own hooks to item forms! 1) Album, photo and movie forms now all use edit_item as the group and we publish item_edit_form and item_edit_form_completed events which makes it much easier in the module to handle all events. They can still differentiate based on $item->type if they want to. 2) Added tag::clear_all() and tag::compact() functions which takes the place of hiwilson's tag::update() function and is now used in tag_event::item_delete(). This provides a simple API that allows us to have a lot less event handling code. It's less efficient than what hiwilson was doing before in that it will delete and re-add tags, but if that ever turns out to be a performance issue we can do something about it then.
2009-07-20(1)Add tag edit field in album/photo edit form. (2)provide edit ↵hiwilson
functionality. (3)support multi-word tagging.
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-17Rename "locale" helper to "locales" to avoid conflicting with PHP 5.3.Bharat Mediratta
Fixes ticket #194
2009-07-17Change model_cache::clear() API to clear everything. This preventsBharat Mediratta
old ORM relationships from hanging around, which was causing problems when doing MPTT manipulations (resulting in incorrect permission propagation-- very bad!)
2009-07-17Fix a bug where moved items don't properly inherit permissions fromBharat Mediratta
their new target. After each move, recalculate the permissions for the new parent's hierarchy. Fixes ticket #552
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-14Move the gallery version out of a module variable and into a constantBharat Mediratta
in the gallery helper. This will let us bump the version without having to bump the gallery module number.
2009-07-14Add /opt/bin as a binary path.Bharat Mediratta
2009-07-11Whitespace fixes.Bharat Mediratta
2009-07-11Position gItem and gPhoto relative, then position quick and thumb menus as ↵Chad Kieffer
absolute within them. Moved css from quick.js to quick.css.
2009-07-10Fix for ticket #341.Tim Almdal
Change the wording for the sort order from "Default" to "Order Added"
2009-07-10Create a new [options] submenu under the thumb menu, and move theBharat Mediratta
Digibug print button into it. Right now, it doesn't display properly.
2009-07-07Merge branch 'master' of git@github.com:/gallery/gallery3Bharat Mediratta
2009-07-08Add task logging to the "Update Search Index" taskTim Almdal
2009-07-08Add task logging to the Update translationsTim Almdal
2009-07-08Added task logging to the Rebuild Images task.Tim Almdal
2009-07-07Change references to Gallery 2 and Gallery 3 to consistently refer toTim Almdal
Gallery n as opposed any variants of this.
2009-07-06Always log the task completion status messageTim Almdal
2009-07-06Catch exceptions that are thrown within the task and log them to the task logTim Almdal
and then set the task to done, the state to error and the status message set to the Exception Message.
2009-07-05Add task logging functionality. When a task runs, it creates a log that isTim Almdal
stored in the persistant cache for 30 days. On the admin_maintenance page there is a new link for completed tasks "browse log". Clicking this will open a dialog box that has the the contents of the log displayed. The user can then view the log and close the dialog, or press the save button to download the log to their local machine.
2009-07-04Fix for ticket #477. Use nl2br method when rendering comment::text andTim Almdal
item::description. In addition add p::clean or p::purify to places that xss cleaning had missed (i.e. rss feeds)
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-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-07-03Update the source so the third party code passes the File Structure TestTim Almdal
2009-07-03Fix for ticket #400: Add HTMLPurifier to gallery3 and change p::clean() to ↵Tim Almdal
call HTMLPurifier->purify()
2009-07-03Fix for ticket #400: Add HTMLPurifier to gallery3 and change p::clean() to ↵Tim Almdal
call HTMLPurifier->purify()
2009-07-03Merge branch 'master' of git@github.com:/gallery/gallery3Bharat Mediratta
2009-07-03Merge branch 'master' of git@github.com:/gallery/gallery3Bharat Mediratta