Commit Graph

8 Commits

Author SHA1 Message Date
Bharat Mediratta
23b0abb974 Redefine the batch API to be very very simple. You call
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-04 08:51:49 +00:00
Bharat Mediratta
b493a534f2 A variety of cleanups:
* 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-04 06:25:55 +00:00
Tim Almdal
81a6dc26cb Send 1 items added notification per batch of items 2009-03-04 03:31:01 +00:00
Bharat Mediratta
9f76d15086 Clean up translations to use t() properly and differentiate between
albums and photos.  We should not say the word "item" to users if we
can avoid it.
2009-02-10 03:42:25 +00:00
Tim Almdal
ef58ac91e8 Notifications now send emails when a comment is published. It won't
send the email if the comment status is not published.  This gives the
administrator to moderate the comments prior to being published.
2009-02-02 15:41:47 +00:00
Andy Staudacher
60d3d6e704 code audit fixes + bug fix: don't call sendmail with an empty To list (in notifications module) 2009-02-02 07:32:45 +00:00
Tim Almdal
e3b5eca50e Add sending notifications when an item is deleted. We are almost
done, just need to do comments.
2009-02-02 05:00:09 +00:00
Tim Almdal
69a7e238a4 As we stagger towards completing the notification module.
Item changes and Item additions email notifications with this change.
Still to come is item deleted, comment added and comment updated.
2009-02-02 03:09:17 +00:00