[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Subscriptions/ -> BulkSubscriptionSender.php (summary)

(no description)

File Size: 261 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BulkSubscriptionSender:: (5 methods):
  sendBulk()
  lock()
  unlock()
  sendDigest()
  sendList()


Class: BulkSubscriptionSender  - X-Ref

sendBulk($page)   X-Ref
Send digest and list subscriptions

This sends mails to all subscribers that have a subscription for namespaces above
the given page if the needed $conf['subscribe_time'] has passed already.

This function is called form lib/exe/indexer.php

return: int number of sent mails
param: string $page

lock($id)   X-Ref
Lock subscription info

We don't use io_lock() her because we do not wait for the lock and use a larger stale time

author: Adrian Lang <lang@cosmocode.de>
return: bool true, if you got a succesful lock
param: string $id The target page or namespace, specified by id; Namespaces

unlock($id)   X-Ref
Unlock subscription info

author: Adrian Lang <lang@cosmocode.de>
return: bool
param: string $id The target page or namespace, specified by id; Namespaces

sendDigest($subscriber_mail, $id, $lastupdate)   X-Ref
Send a digest mail

Sends a digest mail showing a bunch of changes of a single page. Basically the same as sendPageDiff()
but determines the last known revision first

author: Adrian Lang <lang@cosmocode.de>
return: bool
param: string $subscriber_mail The target mail address
param: string $id              The ID
param: int    $lastupdate      Time of the last notification

sendList($subscriber_mail, $ids, $ns_id)   X-Ref
Send a list mail

Sends a list mail showing a list of changed pages.

author: Adrian Lang <lang@cosmocode.de>
return: bool true if a mail was sent
param: string $subscriber_mail The target mail address
param: array  $ids             Array of ids
param: string $ns_id           The id of the namespace