From: SamanthaNguyen Date: Sun, 25 Feb 2018 00:19:31 +0000 (-0600) Subject: Create a custom log formatter that allows log entries to contain wikitext X-Git-Tag: 1.31.0-rc.0~503^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=40fa250a450130d5a952acd50505dac4d31941c3;p=lhc%2Fweb%2Fwiklou.git Create a custom log formatter that allows log entries to contain wikitext This creates a new log formatter called WikitextLogFormatter, which is a simple class that allows log entries to contain properly formatted wikitext. This makes it easier for extensions so they don't have to create their own subclass of LogFormatter. Change-Id: I2b7fddf5c6ef017a0925b4bf75cfd47cb55aa5de --- diff --git a/autoload.php b/autoload.php index f8d1f9f409..ae0dd62e6c 100644 --- a/autoload.php +++ b/autoload.php @@ -1715,6 +1715,7 @@ $wgAutoloadLocalClasses = [ 'Wikimedia\\Rdbms\\TransactionProfiler' => __DIR__ . '/includes/libs/rdbms/TransactionProfiler.php', 'WikitextContent' => __DIR__ . '/includes/content/WikitextContent.php', 'WikitextContentHandler' => __DIR__ . '/includes/content/WikitextContentHandler.php', + 'WikitextLogFormatter' => __DIR__ . '/includes/logging/WikitextLogFormatter.php', 'WinCacheBagOStuff' => __DIR__ . '/includes/libs/objectcache/WinCacheBagOStuff.php', 'WithoutInterwikiPage' => __DIR__ . '/includes/specials/SpecialWithoutinterwiki.php', 'WordLevelDiff' => __DIR__ . '/includes/diff/WordLevelDiff.php', diff --git a/includes/logging/WikitextLogFormatter.php b/includes/logging/WikitextLogFormatter.php new file mode 100644 index 0000000000..13b55595d2 --- /dev/null +++ b/includes/logging/WikitextLogFormatter.php @@ -0,0 +1,35 @@ +parse(); + } +}