diff --git a/ChangeLog b/ChangeLog index 21f98de..2cbe2ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ List of changes between releases of Extension:JsCalendar. == master branch (will become JsCalendar 0.3.4 or 0.4.0, depending on magnitude of changes) == Features: +* Support MediaWiki 1.43. * Added an option to use FullCalendar 5 (most current version) instead of FullCalendar 2.9.1. This is experimental, because the styling of v5 calendar is preliminary and may be changed later. Can be enabled with $wgJsCalendarFullCalendarVersion = 5; diff --git a/includes/EventCalendar.php b/includes/EventCalendar.php index 2067a2d..8097eef 100644 --- a/includes/EventCalendar.php +++ b/includes/EventCalendar.php @@ -103,7 +103,7 @@ public static function findEvents( array $opt, Parser $recursiveParser ) { $res = $query->getResult(); // Obtain connections to DB/cache that may or may not be used for storing snippets in cache. - $dbw = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_MASTER ); + $dbw = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_PRIMARY ); $dbCache = ObjectCache::getInstance( CACHE_DB ); $eventmap = []; diff --git a/tests/phpunit/EventCalendarTest.php b/tests/phpunit/EventCalendarTest.php index 6070748..fa632c4 100644 --- a/tests/phpunit/EventCalendarTest.php +++ b/tests/phpunit/EventCalendarTest.php @@ -730,7 +730,7 @@ public function testSnippetCacheWasUsed() { $cache = ObjectCache::getInstance( CACHE_DB ); $cacheKey = $cache->makeKey( 'jscalendar-snippet-' ) . $pageId; - $dbw = $this->getServiceContainer()->getDBLoadBalancer()->getConnection( DB_MASTER ); + $dbw = $this->getServiceContainer()->getDBLoadBalancer()->getConnection( DB_PRIMARY ); $dbw->insert( 'objectcache', [ 'keyname' => $cache->makeKey( 'jscalendar-snippet-' ) . $pageId, 'value' => $expectedSnippet,