Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12240027
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 45d6755..35264f1 100644
--- a/LocalSettings.php
+++ b/LocalSettings.php
@@ -1,93 +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();
+$wgLocalVirtualHosts = [ "localhost" ];
$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
Sun, Oct 12, 02:01 (1 m, 50 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064441
Default Alt Text
(3 KB)
Attached To
Mode
rSAASMW SaaS MediaWiki
Attached
Detach File
Event Timeline
Log In to Comment