Skip to content

Commit 43b4eb8

Browse files
committed
Avoid setting shared DB
if there is no prime wiki, then there can be no sharing configured
1 parent 2ab3548 commit 43b4eb8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/roles/mediawiki/templates/LocalSettings.php.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
384384
$wgDBmysql5 = false;
385385

386386

387-
{% if primary_wiki_id is defined %}
387+
{% if primary_wiki_id is defined and primary_wiki_id %}
388388
/**
389389
* If a primewiki is defined then every wiki will use that wiki db for certain
390390
* tables. The shared `interwiki` table allows users to use the same interwiki
@@ -410,6 +410,9 @@ $wgSharedTables = array(
410410
'interwiki', // additional
411411
'actor', // additional, but planned to be default in later MW versions
412412
);
413+
{% else %}
414+
// No shared database configured
415+
$wgSharedDB = '';
413416
{% endif %}
414417

415418

0 commit comments

Comments
 (0)