On Thu, Nov 8, 2012 at 10:59 AM, Platonides platonides@gmail.com wrote:
Hola Javier,
Did you look at http://www.mediawiki.org/wiki/Enotif#Notification_mail_.28text_templates_and... ?
No, there's no variable holding the diff. Available variables seem to be $NEWPAGE, $OLDID, $CHANGEDORCREATED, $PAGETITLE, $PAGETITLE_URL, $PAGEMINOREDIT, $UNWATCHURL, $PAGEEDITOR, $PAGEEDITOR_EMAIL, $PAGEEDITOR_WIKI, $PAGESUMMARY, $WATCHINGUSERNAME, $PAGEEDITDATE and $PAGEEDITTIME.
As to how to do that, I would hook on AbortEmailNotification, and perform the same $enotif = new EmailNotification();, $enotif->notifyOnPageChange( ... ); but with my own class instead. Make that class child of EmailNotification. Override the composeCommonMailtext() with your own one, which calls parent::composeCommonMailtext() and then appends to $this->body the diff (nto straightforward, you will need to recover it from $this->oldid). Yes, composeCommonMailtext would need to be changed to protected. Seems a fair change. That class is not too well organised.
Seems a feature we could want to merge upstream, too.
Regards
Thank you Platonides. You were very clear. So, I understand that the real problem is how to get the diff (the specific diffs, not the link to diffs) from $this within EmailNotification class. Could be a good for users who want to see what changed directly in the mail notification.