Skip to content

Commit

Permalink
Merge pull request #387 from MaRDI4NFDI/fix_gui_statement_links
Browse files Browse the repository at this point in the history
Fix GUI statement links
  • Loading branch information
physikerwelt authored Oct 4, 2023
2 parents 07359aa + a8fc624 commit 63145cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ x-common-variables: &wikibase_variables
DB_NAME: ${DB_NAME:-my_wiki}
TLD: ${TLD:-de}
DEPLOYMENT_ENV: ${DEPLOYMENT_ENV:-local}
WIKIBASE_HOST: ${WIKIBASE_HOST:-portal.mardi4nfdi.${TLD}}
WIKIBASE_SCHEME: ${WIKIBASE_SCHEME:-https}
WIKIBASE_HOST: ${WIKIBASE_HOST:-localhost}
WIKIBASE_PORT: ${WIKIBASE_PORT:-80}
QS_PUBLIC_SCHEME_HOST_AND_PORT: https://quickstatements.portal.mardi4nfdi.${TLD}
TRAEFIK_PW: ${TRAEFIK_PW}
x-extra-variables: &wikibase_extra_variables
Expand Down Expand Up @@ -53,7 +55,7 @@ services:
environment:
<<: [ *wikibase_variables, *wikibase_extra_variables]
WIKIBASE_PINGBACK:
MW_WG___UPLOADS:
MW_WG_ENABLE_UPLOADS:
MATOMO_TOKEN: ${MATOMO_TOKEN}
GOOGLE_OPENID_SECRET: ${GOOGLE_OPENID_SECRET}
labels:
Expand Down
12 changes: 10 additions & 2 deletions mediawiki/LocalSettings.d/Wikibase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";

$wikibaseHost = getenv('WIKIBASE_HOST');

if ($wikibaseHost === 'localhost') {
$portalHost = getenv('WIKIBASE_SCHEME') . '://localhost:' . getenv('WIKIBASE_PORT');
} else {
$portalHost = getenv('WIKIBASE_SCHEME') . $wikibaseHost;
}

# enable linking between wikibase and content pages
$wgWBRepoSettings['siteLinkGroups'] = [ 'mathematics' ];
$wgWBClientSettings['siteLinkGroups'] = [ 'mathematics' ];
$wgWBClientSettings['siteGlobalID'] = 'mardi';
$wgWBClientSettings['repoUrl'] = 'https://portal.mardi4nfdi.de';
$wgWBClientSettings['repoUrl'] = $portalHost;
$wgWBClientSettings['repoScriptPath'] = '/w';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['entitySources'] = [
'mardi_source' => [
'repoDatabase' => 'my_wiki',
'baseUri' => 'https://portal.mardi4nfdi.de/entity',
'baseUri' => $portalHost . '/entity',
'entityNamespaces' => [
'item' => 120,
'property' => 122,
Expand Down

0 comments on commit 63145cc

Please sign in to comment.