2019-08-16 13:55:44 -04:00
|
|
|
<?php
|
|
|
|
# This file was automatically generated by the MediaWiki 1.30.0
|
|
|
|
# installer. If you make manual changes, please keep track in case you
|
|
|
|
# need to recreate them later.
|
|
|
|
#
|
|
|
|
# See includes/DefaultSettings.php for all configurable settings
|
|
|
|
# and their default values, but don't forget to make changes in _this_
|
|
|
|
# file, not there.
|
|
|
|
#
|
|
|
|
# Further documentation for configuration settings may be found at:
|
|
|
|
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
|
|
|
|
|
|
|
|
# Protect against web entry
|
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
# store passwords/sensitive data here
|
|
|
|
$secrets = require('secrets.php');
|
|
|
|
|
|
|
|
## Uncomment this to disable output compression
|
|
|
|
# $wgDisableOutputCompression = true;
|
|
|
|
|
|
|
|
$wgSitename = "Claremont MakerSpace";
|
|
|
|
$wgMetaNamespace = "Claremont_MakerSpace";
|
|
|
|
|
|
|
|
## The URL base path to the directory containing the wiki;
|
|
|
|
## defaults for all runtime URL paths are based off of this.
|
|
|
|
## For more information on customizing the URLs
|
|
|
|
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
|
|
|
|
## https://www.mediawiki.org/wiki/Manual:Short_URL
|
|
|
|
$wgScriptPath = "";
|
|
|
|
$wgScriptExtension = ".php";
|
|
|
|
$wgArticlePath = "/wiki/$1";
|
|
|
|
$wgUsePathInfo = true;
|
|
|
|
|
|
|
|
## The protocol and server name to use in fully-qualified URLs
|
2020-06-16 12:25:59 -04:00
|
|
|
$wgServer = "https://wiki.claremontmakerspace.org";
|
2019-08-16 13:55:44 -04:00
|
|
|
|
|
|
|
## The URL path to static resources (images, scripts, etc.)
|
|
|
|
$wgResourceBasePath = $wgScriptPath;
|
|
|
|
|
|
|
|
## The URL path to the logo. Make sure you change this from the default,
|
|
|
|
## or else you'll overwrite your logo when you upgrade!
|
|
|
|
$wgLogo = "images/CMS-Logo-BY-v4_alt-small.png";
|
|
|
|
|
|
|
|
## UPO means: this is also a user preference option
|
|
|
|
|
|
|
|
$wgEnableEmail = true;
|
|
|
|
$wgEnableUserEmail = true; # UPO
|
|
|
|
|
|
|
|
$wgEmergencyContact = "apache@claremontmakerspace.org";
|
|
|
|
$wgPasswordSender = "apache@claremontmakerspace.org";
|
|
|
|
|
|
|
|
$wgEnotifUserTalk = true; # UPO
|
|
|
|
$wgEnotifWatchlist = false; # UPO
|
|
|
|
$wgEmailAuthentication = true;
|
|
|
|
|
|
|
|
## Database settings
|
|
|
|
$wgDBtype = "mysql";
|
|
|
|
$wgDBserver = "database";
|
|
|
|
$wgDBname = "mediawiki";
|
|
|
|
$wgDBuser = "mediawiki";
|
|
|
|
$wgDBpassword = $secrets['wgDBpassword'];
|
|
|
|
|
|
|
|
# MySQL specific settings
|
|
|
|
$wgDBprefix = "";
|
|
|
|
|
|
|
|
# MySQL table options to use during installation or update
|
|
|
|
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
|
|
|
|
|
|
|
|
# Experimental charset support for MySQL 5.0.
|
|
|
|
$wgDBmysql5 = false;
|
|
|
|
|
|
|
|
## Shared memory settings
|
|
|
|
$wgMainCacheType = CACHE_NONE;
|
|
|
|
$wgMemCachedServers = [];
|
|
|
|
|
|
|
|
## To enable image uploads, make sure the 'images' directory
|
|
|
|
## is writable, then set this to true:
|
|
|
|
$wgEnableUploads = true;
|
|
|
|
$wgFileExtensions = array_merge( $wgFileExtensions, array( 'pdf', 'svg' ));
|
|
|
|
$wgUseImageMagick = true;
|
|
|
|
$wgImageMagickConvertCommand = "/usr/bin/convert";
|
2020-06-16 12:27:11 -04:00
|
|
|
$wgGenerateThumbnailOnParse = true;
|
2019-08-16 13:55:44 -04:00
|
|
|
|
|
|
|
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
|
|
|
|
$wgUseInstantCommons = false;
|
|
|
|
|
|
|
|
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
|
|
|
|
# about this MediaWiki instance. The Wikimedia Foundation shares this data
|
|
|
|
# with MediaWiki developers to help guide future development efforts.
|
|
|
|
$wgPingback = false;
|
|
|
|
|
|
|
|
## If you use ImageMagick (or any other shell command) on a
|
|
|
|
## Linux server, this will need to be set to the name of an
|
|
|
|
## available UTF-8 locale
|
|
|
|
$wgShellLocale = "en_US.utf8";
|
|
|
|
|
|
|
|
## Set $wgCacheDirectory to a writable directory on the web server
|
|
|
|
## to make your wiki go slightly faster. The directory should not
|
|
|
|
## be publically accessible from the web.
|
|
|
|
#$wgCacheDirectory = "$IP/cache";
|
|
|
|
|
|
|
|
# Site language code, should be one of the list in ./languages/data/Names.php
|
|
|
|
$wgLanguageCode = "en";
|
|
|
|
|
|
|
|
$wgSecretKey = $secrets['wgSecretKey'];
|
|
|
|
|
|
|
|
# Changing this will log out all existing sessions.
|
|
|
|
$wgAuthenticationTokenVersion = "1";
|
|
|
|
|
|
|
|
# Site upgrade key. Must be set to a string (default provided) to turn on the
|
|
|
|
# web installer while LocalSettings.php is in place
|
|
|
|
$wgUpgradeKey = $secrets['wgUpgradeKey'];
|
|
|
|
|
|
|
|
## For attaching licensing metadata to pages, and displaying an
|
|
|
|
## appropriate copyright notice / icon. GNU Free Documentation
|
|
|
|
## License and Creative Commons licenses are supported so far.
|
|
|
|
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
|
|
|
|
$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/4.0/";
|
|
|
|
$wgRightsText = "Creative Commons Attribution-ShareAlike";
|
|
|
|
$wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/cc-by-sa.png";
|
|
|
|
|
|
|
|
# Path to the GNU diff3 utility. Used for conflict resolution.
|
|
|
|
$wgDiff3 = "/usr/bin/diff3";
|
|
|
|
|
|
|
|
# Global Permissions
|
|
|
|
$wgGroupPermissions['*']['createaccount'] = false;
|
|
|
|
$wgGroupPermissions['*']['autocreateaccount'] = true;
|
|
|
|
$wgGroupPermissions['*']['edit'] = false;
|
|
|
|
|
|
|
|
## Default skin: you can change the default skin. Use the internal symbolic
|
|
|
|
## names, ie 'vector', 'monobook':
|
|
|
|
$wgDefaultSkin = "Timeless";
|
|
|
|
|
|
|
|
# Enabled skins.
|
|
|
|
# The following skins were automatically enabled:
|
|
|
|
wfLoadSkin( 'MonoBook' );
|
|
|
|
wfLoadSkin( 'Vector' );
|
|
|
|
wfLoadSkin( 'Timeless' );
|
|
|
|
|
|
|
|
# End of automatically generated settings.
|
|
|
|
# Add more configuration options below.
|
|
|
|
|
|
|
|
# Semantic MediaWiki Extension
|
|
|
|
enableSemantics( 'claremontmakerspace.org' );
|
|
|
|
$smwgPDefaultType = '_txt';
|
|
|
|
$smwgEnabledQueryDependencyLinksStore = true;
|
|
|
|
|
2020-04-26 17:02:30 -04:00
|
|
|
wfLoadExtension( 'SemanticACL' );
|
|
|
|
|
2019-08-16 13:55:44 -04:00
|
|
|
wfLoadExtension( 'WikiEditor' );
|
|
|
|
wfLoadExtension( 'CodeEditor' );
|
|
|
|
$wgDefaultUserOptions['usebetatoolbar'] = 1; // user option provided by WikiEditor extension
|
|
|
|
|
|
|
|
wfLoadExtension( 'CodeMirror' );
|
|
|
|
|
|
|
|
wfLoadExtension( 'ReplaceText' );
|
|
|
|
|
|
|
|
#wfLoadExtension( 'UserMerge' );
|
|
|
|
#$wgGroupPermissions['bureaucrat']['usermerge'] = true;
|
|
|
|
|
2020-10-13 01:11:53 -04:00
|
|
|
wfLoadExtension( 'NativeSvgHandler' );
|
2019-08-16 13:55:44 -04:00
|
|
|
|
2020-07-05 01:49:42 -04:00
|
|
|
wfLoadExtension( 'ParserFunctions' );
|
|
|
|
|
2019-08-16 13:55:44 -04:00
|
|
|
wfLoadExtension( 'Scribunto' );
|
|
|
|
$wgScribuntoDefaultEngine = 'luastandalone';
|
|
|
|
$wgScribuntoUseCodeEditor = "true";
|
|
|
|
|
|
|
|
# LDAP
|
2020-01-08 21:12:29 -05:00
|
|
|
wfLoadExtension( 'PluggableAuth' );
|
|
|
|
wfLoadExtension( 'LDAPProvider' );
|
|
|
|
wfLoadExtension( 'LDAPUserInfo' );
|
|
|
|
wfLoadExtension( 'LDAPAuthentication2' );
|
|
|
|
$LDAPProviderDomainConfigProvider = function() use ($secrets) {
|
|
|
|
$config = [
|
|
|
|
'CMS' => [
|
|
|
|
"connection" => [
|
|
|
|
"server" => "self-service.claremontmakerspace.org",
|
2020-06-16 12:04:10 -04:00
|
|
|
"port" => 7389,
|
|
|
|
"enctype" => "clear",
|
2020-01-08 21:12:29 -05:00
|
|
|
"user" => "uid=LDAPSearch,cn=users,dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
|
|
"pass" => $secrets['LDAPPass'],
|
|
|
|
"options" => [
|
|
|
|
"LDAP_OPT_DEREF" => 1,
|
|
|
|
],
|
|
|
|
"basedn" => "cn=users,dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
|
|
"groupbasedn" => "dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
|
|
"userbasedn" => "dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
|
|
"searchattribute" => "uid",
|
|
|
|
"searchstring" => "uid=USER-NAME,cn=users,dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
|
|
"usernameattribute" => "uid",
|
|
|
|
"realnameattribute" => "cn",
|
|
|
|
"emailattribute" => "mail"
|
|
|
|
],
|
2020-06-16 12:04:10 -04:00
|
|
|
"authentication" => [
|
|
|
|
"usernameattribute" => "uid",
|
|
|
|
"realnameattribute" => "cn",
|
|
|
|
"emailattribute" => "mail"
|
|
|
|
],
|
2020-01-08 21:12:29 -05:00
|
|
|
"userinfo" => [
|
2020-06-16 12:04:10 -04:00
|
|
|
"email" => "mail",
|
2020-01-08 21:12:29 -05:00
|
|
|
"realname" => "cn",
|
|
|
|
"properties.gender" => "gender"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
|
|
|
|
return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
|
|
|
|
};
|
2019-08-16 13:55:44 -04:00
|
|
|
|
|
|
|
wfLoadExtension( 'VisualEditor' );
|
2019-09-27 16:11:33 -04:00
|
|
|
|
2020-06-25 03:25:03 -04:00
|
|
|
wfLoadExtension( 'TemplateData' );
|
|
|
|
|
2020-07-24 15:28:22 -04:00
|
|
|
wfLoadExtension( 'Variables' );
|
|
|
|
|
2020-07-24 15:26:16 -04:00
|
|
|
wfLoadExtension( 'CSS' );
|
|
|
|
|
2020-10-13 01:11:53 -04:00
|
|
|
wfLoadExtension( 'Widgets' );
|
2020-07-05 02:01:32 -04:00
|
|
|
|
2020-07-24 15:23:12 -04:00
|
|
|
require_once "$IP/extensions/QRLite/QRLite.php";
|
|
|
|
|
2020-07-05 02:01:32 -04:00
|
|
|
wfLoadExtension( 'ExternalData' );
|
|
|
|
$edgStringReplacements['SNIPEIT_URL'] = 'https://inventory.claremontmakerspace.org';
|
|
|
|
$edgAllowExternalDataFrom = 'SNIPEIT_URL';
|
|
|
|
// TODO: Use ExternalDataBeforeWebCall to set the headers only for
|
|
|
|
// snipeit API calls. Only matters if other domains are added to
|
|
|
|
// the whitelist.
|
|
|
|
$edgHTTPOptions = [
|
|
|
|
'headers' => [
|
|
|
|
'Accept' => 'application/json',
|
|
|
|
'Content-Type' => 'application/json',
|
|
|
|
'Authorization' => 'Bearer '.$secrets['SnipeITAPIKey']
|
|
|
|
]
|
|
|
|
];
|