* @license MIT
*/
+use MediaWiki\Revision\RevisionRecord;
+
class MMNotify{
/**
* Occurs after a new article has been created.
* @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleInsertComplete
*/
- static function onPageContentInsertComplete(WikiPage $wikiPage, $user, $text, $summary, $isminor, $iswatch, $section, $flags, $revision){
+ static function onPageSaveComplete($wikiPage, $user, $summary, $flags, $revisionRecord, $editResult){
if (stripos($wikiPage->getTitle()->getText(), 'FSPlenum') === false) return;
- $text = ContentHandler::getContentText($wikiPage->getRevision()->getContent( Revision::RAW));
+ $text = ContentHandler::getContentText($revisionRecord->getContent(($revisionRecord->getSlotRoles())[0], RevisionRecord::RAW ));
preg_match_all('/^={1,4}[^=].*$/m', $text, $out);
$post = '\n';
]
},
"Hooks": {
- "PageContentInsertComplete": [
+ "PageSaveComplete": [
[
- "MMNotify::onPageContentInsertComplete"
+ "MMNotify::onPageSaveComplete"
]
]
},