Skip to content

Commit

Permalink
Use to determine the settings
Browse files Browse the repository at this point in the history
This is similar to what is done by WMF
  • Loading branch information
physikerwelt committed Jul 24, 2023
1 parent 68300ac commit b14cfdf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions mediawiki/LocalSettings.d/00_database.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
2 changes: 2 additions & 0 deletions mediawiki/LocalSettings.d/Vector.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php

wfLoadSkin( 'Vector' );
$wgDefaultSkin = 'vector-2022';

Expand Down
6 changes: 3 additions & 3 deletions mediawiki/LocalSettings.d/Wikibase.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php
## Wikibase

wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";

enable linking between wikibase and content pages
# enable linking between wikibase and content pages
$wgWBRepoSettings['siteLinkGroups'] = [ 'mathematics' ];
$wgWBClientSettings['siteLinkGroups'] = [ 'mathematics' ];
$wgWBClientSettings['siteGlobalID'] = 'mardi';
Expand All @@ -27,8 +28,7 @@
// my_wiki is the MaRDI database
$wgLocalDatabases = [ 'wiki_swmath', 'my_wiki' ];


if ( !str_contains($_SERVER['HTTP_HOST'],'swmath') ){
if ( $wgDBname !== 'wiki_swmath' ){

wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
Expand Down
2 changes: 1 addition & 1 deletion mediawiki/LocalSettings.d/WikibaseExport.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
wfLoadExtension( 'WikibaseExport' );
$wgDBname !== 'wiki_swmath' ? wfLoadExtension( 'WikibaseExport' ) : NULL;
2 changes: 1 addition & 1 deletion mediawiki/LocalSettings.d/WikibaseLocalMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// https://github.com/ProfessionalWiki/WikibaseLocalMedia
## WikibaseLocalMedia Configuration
## NOTE: WikibaseLocalMedia does currently not work in a client only setup.
wfLoadExtension( 'WikibaseLocalMedia' );
$wgDBname !== 'wiki_swmath' ? wfLoadExtension( 'WikibaseLocalMedia' ) : NULL;
4 changes: 1 addition & 3 deletions mediawiki/LocalSettings.d/swmath.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
if ( str_contains($_SERVER['HTTP_HOST'],'swmath') ){
$wgDBname = 'wiki_swmath';
# Set name of the wiki
if ( $wgDBname === 'wiki_swmath' ){
$wgSitename = 'swMATH staging';
# Set swMATH logo
$wgLogos = [
Expand Down

0 comments on commit b14cfdf

Please sign in to comment.