Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769514
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/LocalSettings.php b/LocalSettings.php
index 89c6410..45d6755 100644
--- a/LocalSettings.php
+++ b/LocalSettings.php
@@ -1,91 +1,93 @@
<?php
# -------------------------------------------------------------
# Configuration for Nasqueron MediaWiki SaaS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-03-19
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
use Nasqueron\SAAS\MediaWiki\Configuration\CommonSettings;
use Nasqueron\SAAS\MediaWiki\Service;
use Nasqueron\SAAS\MediaWiki\Environment;
require_once __DIR__ . '/vendor/autoload.php';
# -------------------------------------------------------------
# Load service and configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Environment::load();
$service = Service::preload();
$service->run();
$serviceConfiguration = $service->getConfiguration();
$wgLocalDatabases = $serviceConfiguration->getLocalDatabases();
$wgConf->wikis = $wgLocalDatabases;
$wgConf->localVHosts = [ 'localhost' ];
$wgConf->settings = $serviceConfiguration->getSettings();
$wgConf->suffixes = $wgLocalDatabases;
$wgConf->siteParamsCallback = 'Nasqueron\SAAS\MediaWiki\Hooks::onSiteParameters';
# -------------------------------------------------------------
# Database settings
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$wgDBname = $serviceConfiguration->getSelectedDatabase();
$wgDBserver = $_ENV['DB_HOST'];
$wgDBuser = $_ENV['DB_USER'];
$wgDBpassword = $_ENV['DB_PASS'];
# -------------------------------------------------------------
# Fixes needed before extracting settings
#
# :: Fix executable paths, by default Linux-centric
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if (Environment::isBSD()) {
CommonSettings::fixExecutablePaths($wgConf->settings, "/usr/local/bin");
}
# -------------------------------------------------------------
# Populate the global spaces with settings
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$wgConf->extractAllGlobals( $wgDBname );
# -------------------------------------------------------------
# Fixes needed after extractings ettings
#
# :: Group permissions
# :: Settings with common configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CommonSettings::fixGroupPermissions($saasExtraGroupPermissions);
if ($saasUseScribunto) {
CommonSettings::enableScribunto();
}
CommonSettings::enableLog();
# -------------------------------------------------------------
# Paths and settings defined in environment
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$wgScript = "{$wgScriptPath}/index.php";
$wgSecretKey = $_ENV["MEDIAWIKI_SECRET_KEY"];
+$wgServer = "https://" . $service->getHost();
+
$wgCacheDirectory = $serviceConfiguration->getCacheDir();
$wgFileCacheDirectory = $wgCacheDirectory . "/pages";
$wgUploadDirectory = $serviceConfiguration->getDataStoreDir() . "/images";
# -------------------------------------------------------------
# Load extensions and skins
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
wfLoadExtensions($serviceConfiguration->getResources('Extension'));
wfLoadSkins($serviceConfiguration->getResources('Skin'));
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 25, 15:13 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258287
Default Alt Text
(3 KB)
Attached To
Mode
rSAASMW SaaS MediaWiki
Attached
Detach File
Event Timeline
Log In to Comment