openSUSE / wiki

openSUSE Wiki
http://en.opensuse.org
25 stars 17 forks source link

Rename LocalSettings.php to GlobalSettings.php and allow developers to have their own development environment #16

Closed guoyunhe closed 5 years ago

guoyunhe commented 6 years ago

The idea is to move all configuration in LocalSettings.php to a GlobalSettings.php . Then developers can have their own database credentials , server name, etc. for local development.

Content in manually created LocalSettings.php contains:

<?php

if ( !defined( 'MEDIAWIKI' ) ) {
    exit;
}

require_once( __DIR__ . '/GlobalSettings.php');

$wgServer = "http://localhost:8086";

$wgDBtype = "sqlite";
$wgDBserver = "";
$wgDBname = "wiki";
$wgDBuser = "";
$wgDBpassword = "";

$wgSQLiteDataDir = __DIR__ . '/database';
$wgObjectCaches[CACHE_DB] = [
    'class' => 'SqlBagOStuff',
    'loggroup' => 'SQLBagOStuff',
    'server' => [
        'type' => 'sqlite',
        'dbname' => 'wikicache',
        'tablePrefix' => '',
        'dbDirectory' => $wgSQLiteDataDir,
        'flags' => 0
    ]
];

$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];

$wgSecretKey = "a261fb960e6d31e0f73e3958b73109b4d8e65650fe2b07b0d72813845653dc23";

$wgAuthenticationTokenVersion = "1";

$wgUpgradeKey = "5f4b7b6c8c33a0bc";