From 80fd7d9803fbc0f94ecf28cb8e4539eb04cef84a Mon Sep 17 00:00:00 2001 From: paladox Date: Sat, 20 Mar 2021 23:52:50 +0000 Subject: [PATCH] Update Extension.php --- includes/Extension.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/Extension.php b/includes/Extension.php index 2a3b29c..69f639d 100644 --- a/includes/Extension.php +++ b/includes/Extension.php @@ -76,6 +76,14 @@ class Extension { */ public static function onPageContentSave( &$wikiPage, &$user, &$content, &$summary, $isMinor, $isWatch, $section, &$flags, &$status ) { + global $wgVersion; + + if ( version_compare( $wgVersion, '1.35', '>=' ) ) { + // This hook is deprecated and does not work as intended on MW 1.32+. + // Instead we use onMultiContentSave which works from 1.35+. + return true; + } + $config = new Config(); if ( !$config->parseOnEdit || $isMinor ) return true; $source = Source::createFromPageandContent( $wikiPage, $content, $config );