From: Hamatoma Date: Sat, 27 Apr 2024 20:35:52 +0000 (+0200) Subject: V 0.2.3 MediaWiki X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=1bf49a6745b771dc76ce2b813e6809dd4739603d;p=gadeku.git V 0.2.3 MediaWiki - Mediawiki: Korrekturen bei %date()% und %dateTime()%, %color()% umbenannt in %mark()% --- diff --git a/CHANGELOG.md b/CHANGELOG.md index cd74f71..6a7039d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# V 0.2.3 MediaWiki + +- Mediawiki: Korrekturen bei %date()% und %dateTime()%, %color()% umbenannt in %mark()% + # V 0.2.2 MediaWiki Page ## Added diff --git a/app/Helpers/MediaWiki.php b/app/Helpers/MediaWiki.php index f43f448..deef9a7 100644 --- a/app/Helpers/MediaWiki.php +++ b/app/Helpers/MediaWiki.php @@ -31,17 +31,17 @@ class MediaWiki extends MediaWikiBase $body = preg_replace_callback('/%(\w+)\((.*?)(\|.*?)?\)%/', function ($matches) { switch ($matches[1]) { case 'date': - $rc = date('%Y.%m.%d'); + $rc = date('Y.m.d'); break; case 'dateTime': - $rc = date('%Y.%m.%d %H:%M'); + $rc = date('Y.m.d H:i'); break; case 'trans': $text = $matches[2]; $info = count($matches) > 3 ? $text : substr($matches[3], 1); $rc = "$text"; break; - case 'color': + case 'mark': $rc = '' . $matches[2] . ''; break; case 'add':