[pmwiki-devel] notify'ing a page

Patrick R. Michaud pmichaud at pobox.com
Tue Jan 9 10:51:36 CST 2007


On Tue, Jan 09, 2007 at 03:50:30PM -0000, marc wrote:
> Hi,
> 
> To register a page to notify - after a WritePage - is anything more 
> required than:
> 
>   $IsPagePosted = true;
>   NotifyUpdate(group.page);

Better is probably:

    $IsPagePosted = true;
    PostNotify('group.page', $page, $page);

The $page parameter is a dummy parameter -- PostNotify doesn't
use them (they're just there for signature compatibility with the
rest of the EditFunctions).

PostNotify() is better because it postpones the notification 
until after other processing has completed and output has been
flushed to the browser.  That way the person on the other end
isn't stuck waiting for notifications to take place (which may
take a short while, depending on how many pending notifications
there are) before seeing the results of the page request.

Pm



More information about the pmwiki-devel mailing list