summaryrefslogtreecommitdiff
path: root/modules/notification
AgeCommit message (Collapse)Author
2009-08-28Wrap all the notification helpers call with a try catch that swallows the ↵Tim Almdal
exceptions, so the exceptions don't interrupt the upstream processes
2009-08-27Remove 'ENGINE=InnoDB' specification from tables that we create. UseBharat Mediratta
the system's default table specification. Fixes ticket #597.
2009-08-02Change the API for getting to the original state of an ORM.Bharat Mediratta
Old API: $obj->original("field_name") New API: $obj->original()->field_name This allows us to revert the varous xxx_updated events back to passing an original ORM as well as the the updated one. This makes for a cleaner event API. Old API: comment_updated($comment) { $comment->original("field_name") } Old API: comment_updated($old, $new) { $old->field_name }
2009-07-28Use events to generate menus, instead of having xxx_menu helpers.Bharat Mediratta
This is the first step towards having a simple, lightweight and unified API for module interaction.
2009-07-25Rename columns that use reserved SQL words : items.left and items.rightRomain LE DISEZ
2009-07-23Remove extra error log lineBharat Mediratta
2009-07-22Modified the notification get_subscribers to ignore any users that don'tTim Almdal
have "view" access to the item the notification is being generated for. Fix for ticket: #538.
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-13Add quotes around all values that contain spaces in them, and add aBharat Mediratta
test to make sure that we continue to do so. This makes sure that we don't have problems with 5.3 which treats the literal "on" as a boolean.
2009-07-09Fix typo in p::purify() call.Bharat Mediratta
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-06-23Refactor the install/upgrade code to be more flexible.Bharat Mediratta
Add xxx_installer::upgrade($version) method so that upgrade stanzas are separate from install stanzas. In the old code, to do an upgrade meant that you had to re-evolve everything from the initial install because we'd step through each version's changes. But what we really want is for the initial install to start off in the perfect initial state, and the upgrades to do the work behind the scenes. So now the install() function gets things set up properly the first time, and the upgrade() function does any work to catch you up to the latest code. See gallery_installer.php for a good example.
2009-06-05Move watch notification menu from the view menu to under the Options menu.Chad Kieffer
2009-06-04Update notify/watch eyeglasses icon with bullhorn icon. Rename css/image ↵Chad Kieffer
names from watch to notify.
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-31Run all variables that come from user-entered data through p::clean()Bharat Mediratta
2009-05-31Run p::clean() on any variables that contain data entered by users.Bharat Mediratta
2009-05-26Restructure the module lifecycle.Bharat Mediratta
Install: <module>_installer::install() is called, any necessary tables are created. Activate: <module>_installer::activate() is called. Module controllers are routable, helpers are accessible, etc. The module is in use. Deactivate: <module>_installer::deactivate() is called. Module code is not accessible or routable. Module is *not* in use, but its tables are still around. Uninstall: <module>_installer::uninstall() is called. Module is completely removed from the database. Admin > Modules will install and activate modules, but will only deactivate (will NOT uninstall modules).
2009-05-21Redirect after success to the absolute urlBharat Mediratta
2009-05-13Gee it's May already. Update copyright to 2009.Bharat Mediratta
2009-03-04Redefine the batch API to be very very simple. You callBharat Mediratta
batch::start() before starting a series of events, and batch::stop() when you're done. In batch mode, the notification module will store up pending notifications. When the batch job is complete, it'll send a single digested email to each user for all of her notifications. Updated the scaffold and local_import to use this. Haven't modified SimpleUploader yet.
2009-03-04A variety of cleanups:Bharat Mediratta
* Allow for the "movie" type in all of our text * Try to follow the pattern of mainly only passing ORM objects to the view and let it generate its own text (this becomes even more important when 3rd parties want to customize notification messages) * Rename _send_message to be _notify_subscribers to be more acccurate and have it explicitly take a subject in the API * Use Item_Model::url() in the views instead of hand crafting URLs * Reformat HTML in views * Use $comment->author_xxx() functions instead of replicating that code * Fix several places where we were encoding data by doing ucfirst($item->type) with conditionals where we form the text properly. We should *never* be showing data types to the end user! This is not localizable! Note that this probably breaks the existing batch processing code. I am going to redo that in a subsequent pass.
2009-03-04Simplify logic a bit and tweak the visible text.Bharat Mediratta
2009-03-04Send 1 items added notification per batch of itemsTim Almdal
2009-03-03Undo r20234Tim Almdal
2009-03-03Removed the === false and === true checksTim Almdal
2009-02-28Change the pattern to identify tables that need prefix substitution toTim Almdal
mirror the drupal pattern of using braces {}.
2009-02-27This implements table prefix for all the queries in core, user, exif,Tim Almdal
tag, search, comment and notification modules (Ticket #68)
2009-02-10Clean up translations to use t() properly and differentiate betweenBharat Mediratta
albums and photos. We should not say the word "item" to users if we can avoid it.
2009-02-10Indentation fix.Bharat Mediratta
2009-02-08Use the ORM method delete_all to remove selected records from theTim Almdal
database instead of calling the Database::query with raw sql.
2009-02-05Set default charset to utf8Bharat Mediratta
2009-02-04Delete subscriptions when a user is deletedTim Almdal
2009-02-02Notifications now send emails when a comment is published. It won'tTim Almdal
send the email if the comment status is not published. This gives the administrator to moderate the comments prior to being published.
2009-02-02Enable csrf validation on the add/remove notification controllerTim Almdal
2009-02-02code audit fixes + bug fix: don't call sendmail with an empty To list (in ↵Andy Staudacher
notifications module)
2009-02-02Add sending notifications when an item is deleted. We are almostTim Almdal
done, just need to do comments.
2009-02-02Change the item menu to allow the watch icon to change depending onTim Almdal
whether the item is currently being watched. Currently the icon is the same as the add icon and needs to be changed.
2009-02-02We no longer need a dialog to set or remove a watch, so remove it.Tim Almdal
2009-02-02As we stagger towards completing the notification module.Tim Almdal
Item changes and Item additions email notifications with this change. Still to come is item deleted, comment added and comment updated.
2009-02-01Remove models/notification.php as it is no longer usedTim Almdal
2009-02-01Simplify the setting of a notifications. Notifications are not onlyTim Almdal
set on a album. The notifications are implicitly active for all child elements. It now sends emails if the email address of the subscribed user has been set. No email, no attempt to send the notification. Still to do, come up with better messages as the current ones are just place holders.
2009-01-30The start of the notification module. At this point, the icon has been ↵Tim Almdal
added to the item menu in the sidebar (both photo and album). There is a corresponding icon in themes/default/images that needs to be spruced up. You can add and remove notifications to albums and photos, but nothing happens under the covers for event handling.