El 08/11/12 15:12, Javier del Pozo escribió: > I am sorry if this message shouldn't be here, but what I need to know is > how to bring the changes made to show them in the page > MediaWiki:enotif_body. Is there any parameter that contains the last > changes usable in enotif_body page? > Thank you.
Hola Javier, Did you look at http://www.mediawiki.org/wiki/Enotif#Notification_mail_.28text_templates_and_variables_therein.29 ? 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 _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
