diff --git a/.gitignore b/.gitignore index cdacd71f571e5..1b6d08d071ca6 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,7 @@ sftp-config.json /maintenance/.mweval_history /maintenance/.mwsql_history /maintenance/dev/data -/LocalSettings.php +# LocalSettings.php /includes/PlatformSettings.php # Building & testing diff --git a/LocalSettings.php b/LocalSettings.php new file mode 100644 index 0000000000000..eff6b63fbc066 --- /dev/null +++ b/LocalSettings.php @@ -0,0 +1,629 @@ + getenv('MAIL_SMTP_HOST'), +//'IDHost' => "PLATZHALTER", +'port' => getenv('MAIL_SMTP_PORT', 25) +//'auth' => true, +//'username' => 'PLATZHALTER', +//'password' => 'PLATZHALTER' +]; +$wgPasswordSender = getenv( 'PASSWORD_SENDER' ); # Email address used by the wiki +$wgEmergencyContact = getenv( 'EMERGENCY_CONTACT' ); # Email address used by the wiki + +$wgServer = getenv( 'SERVICE_URL' ); # E.g., fina.knowledge.wiki + +$wgMatomoAnalyticsServerURL = getenv( 'MATOMO_SERVER_URL' ); # E.g., https://matomo.knowledge.wiki/ +###################################################### +// Platzhalter - können geändert werden + +// Database +$wgDBtype = 'mysql'; +//$wgDBserver = 'localhost'; +$wgDBprefix = ''; +//$wgDBname = 'fina'; +$wgDBprefix = "fw"; + +// Elaticsearch +$wgCirrusSearchServers = getenv( 'OPENSEARCH_SERVER' ); +$wgCirrusSearchIndexBaseName = $wgDBname; +$wgSearchType = 'CirrusSearch'; + +###################################################### + +// Basic info +$wgLanguageCode = 'en'; # can be changed for the wiki + +// URL paths +$wgScriptPath = '/w'; +$wgUsePathInfo = true; +$wgResourceBasePath = $wgScriptPath; + +// Files +$wgEnableUploads = true; +$wgUseImageMagick = true; +$wgImageMagickConvertCommand = '/usr/bin/convert'; +$wgShellLocale = 'C.UTF-8'; + +$wgFileExtensions = [...$wgFileExtensions, 'png', 'jpg', 'jpeg', 'docx', 'doc', 'pptx', 'ppt', 'xlsx', 'xls', 'pdf', 'svg', 'ico', 'txt']; +$wgAllowJavaUploads = true; + +// Emails +$wgEnableEmail = true; +$wgEnableUserEmail = true; + +$wgEnotifUserTalk = false; # can be changed for the wiki +$wgEnotifWatchlist = false; # can be changed for the wiki +$wgEmailAuthentication = true; + +// Caches +$wgMainCacheType = CACHE_ACCEL; +$wgSessionCacheType = CACHE_DB; # so sessions aren't lost +$wgMemCachedServers = []; # can be enabled for the wiki + +// Performance optimizations +$wgDisableCounters = true; +$wgMiserMode = true; + +$wgUseGzip = true; +$wgEnableSidebarCache = true; # should be disabled if HideSidebar is installed on the wiki +$wgJobRunRate = 0; + +$wgRevisionCacheExpiry = 3 * 24 * 3600; +$wgParserCacheExpireTime = 14 * 24 * 3600; + +// Timezone +$wgLocaltimezone = 'UTC'; # can be changed for the wiki + +// Skin +$wgDefaultSkin = 'vector'; + +wfLoadSkin( 'Vector' ); +wfLoadSkin( 'MonoBook' ); +wfLoadSkin( 'Timeless' ); + +# The directory vps-wiki-config and its content is not provided. +wfLoadExtension( 'EmailLogger' ); +$wgEmailLoggerLogFilePath = "/app/mwlog/emaillog.csv"; +$wgEmailLoggerFailSilently = false; + +// hCaptcha +$wgHCaptchaSiteKey = getenv( 'HCAPTCHA_SITE_KEY' ) ?: ''; +$wgHCaptchaSecretKey = getenv( 'HCAPTCHA_SECRET_KEY' ) ?: ''; + +#error_reporting( E_ALL ); +#ini_set( 'display_errors', 1 ); +# Protect against web entry +if ( !defined( 'MEDIAWIKI' ) ) { + exit; +} + +$wgCacheEpoch = 20220901150130; + +$wgSitename = 'Fina Wiki'; +$wgMetaNamespace = "FINA"; +$wgPingback = false; +$wgShellLocale = "C.UTF-8"; +$wgLanugageCode = "en"; +$wgSecretKey = "da5bfc1128bbf222b83d2affdad246e41ee0e775413cbd76f54132b5bb3516b7"; +//$wgUpgradeKey = "adccc040fae09ccc"; +$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright +$wgRightsUrl = ""; +$wgRightsText = ""; +$wgRightsIcon = ""; +//$wgUploadDirectory = ""; + +$wgDiff3 = "/usr/bin/diff3"; + + +$wgScriptPath = "/w"; +//$wgResourceBasePath = $wgScriptPath; +$wgArticlePath = "/$1"; +$wgUsePathInfo = true; +$wgScriptExtension = ".php"; + +$wgJobRunRate = 0; + +$wgUploadPath = "$wgScriptPath/img_auth.php"; +$wgUploadDirectory = __DIR__ . "/extensions/MyWikisLocalConfig/images"; + +$wgLogo = "/fina-logo.png"; +$wgFavicon = "/favicon.png"; +//$wgUploadPath = "/w/img_auth.php"; + +//$wgUploadPath = "w/img_auth.php"; +//$wgUploadPath = __DIR__ . "/images"; +//$wgUploadPath = "$wgScriptPath/img_auth.php"; +//$wgUploadDirectory = "$wgScriptPath/images";; +//$wgUploadDirectory = __DIR__ . "/images"; +//$wgUploadPath = __DIR__ . "../../w/images"; +//$wgUploadDirectory = __DIR__ . "../../w/images"; +//$wgImgAuthPublicTest = false; +$wgEnableUploads = true; +$wgUseImageMagick = false; +//$wgImageMagickConvertCommand = "/usr/bin/convert"; +//$wgImageMagickConvertCommand = "convertX"; +//$wgHashedUploadDirectory = "false"; +//$wgTmpDirectory = ini_get('upload_tmp_dir'); +$wgTmpDirectory = __DIR__ . "/extensions/MyWikisLocalConfig/images/temp"; +//$wgTmpDirectory = "$wgScriptPath/images/temp"; + + +// General settings +$wgEnableEmail = true; +$wgEnableUserEmail = true; # UPO + +$wgEnotifUserTalk = true; # UPO +$wgEnotifWatchlist = true; # UPO +$wgEmailAuthentication = true; + +//Uploads +$wgEnableUploads = true; +$wgUseImageMagick = false; +//$wgImageMagickConvertCommand = "/usr/bin/convert"; + +//Group permissions +// Implicit group for all visitors +$wgGroupPermissions['*' ]['createaccount'] = false; +$wgGroupPermissions['*' ]['read'] = true; +$wgGroupPermissions['*' ]['edit'] = false; +$wgGroupPermissions['*' ]['createpage'] = false; +$wgGroupPermissions['*' ]['createtalk'] = false; +$wgGroupPermissions['*' ]['writeapi'] = false; + +$wgFileExtensions = array('jpg','jpeg','png','gif','doc','docx','xls','xlsx','ppt','pptx','pdf','odt','zip'); +//$wgCheckFileExtensions = true; +$wgAllowJavaUploads = true; +$wgVerifyMimeType = false; +$wgPingback = false; + +//Error handling +$wgShowExceptionDetails = true; + +// Footer +$wgFooterIcons['poweredby']['knowledge.wiki'] = array( + "src" => "/KnowledgeWiki.png", + "url" => getenv('SERVICE_URL'), + "alt" => "a Knowledge.wiki project", + "height" => "31", + "width" => "100", +); + +unset ($wgFooterIcons['poweredby']['mediawiki']); + +$wgRightsUrl = "https://creativecommons.org/share-your-work/public-domain/cc0/"; +$wgRightsText = "CC0"; +$wgRightsIcon = "https://licensebuttons.net/p/zero/1.0/88x31.png"; + +#Caching +$wgMainCacheType = CACHE_ANYTHING; +$wgParserCacheType = CACHE_ANYTHING; +$smwgMainCacheType = CACHE_ANYTHING; +$wgCachePages = true; +$wgEnableSidebarCache = true; + +/// CirrusSearch +wfLoadExtension( 'Elastica' ); +wfLoadExtension( 'CirrusSearch' ); +wfLoadExtension( 'AdvancedSearch' ); + +// SMW +wfLoadExtension( 'SemanticMediaWiki' ); +enableSemantics( parse_url( $wgServer, PHP_URL_HOST ) ); +$smwgQSortFeatures = $smwgQSortFeatures | SMW_QSORT_UNCONDITIONAL; +$smwgParserFeatures = SMW_PARSER_STRICT | SMW_PARSER_INL_ERROR | SMW_PARSER_HID_CATS | SMW_PARSER_UNSTRIP | SMW_PARSER_LINV; +$smwgQEqualitySupport = SMW_EQ_NONE; // always interpret redirects as equality in queries +$smwgPageSpecialProperties = array( '_MDAT', '_CDAT', '_NEWP', '_LEDT'); +$smwgQMaxInlineLimit = 20000; +$smwgQMaxLimit = 20000; +$smwgCompactLinkSupport = false; +$wgMaxArticleSize = 4096; +$smwgQSubcategoryDepth = 10; +$wgCategoryCollation = 'numeric'; +$smwgEntityCollation = 'numeric'; + +// VisualEditor +wfLoadExtension( 'VisualEditor' ); +$wgDefaultUserOptions['visualeditor-enable'] = 0; +$wgVisualEditorEnableDiffPage = true; +$wgVisualEditorEnableVisualSectionEditing = true; +$wgVisualEditorAvailableNamespaces['Help'] = true; + +/// Skins +wfLoadExtension( 'Bootstrap'); +wfLoadExtension( 'Kma'); +wfLoadSkin( 'Kma' ); +$wgDefaultSkin='kma'; +$egChameleonLayoutFile= __DIR__ . '/skins/Kma/SITE/FINA-layout.xml'; +$egChameleonThemeFile = __DIR__ . '/skins/Kma/SITE/f_variables.scss'; +$egChameleonExternalStyleModules = [ __DIR__ . '/skins/Kma/SITE/f_bootswatch.scss' => 'afterMain',]; +$egChameleonEnableVisualEditor = true; + +$egChameleonEnableExternalLinkIcons = false; +$egChameleonExternalStyleVariables = [ + 'body-bg' => '#ffffff', + + 'font-family-base' => "Roboto,sans-serif", + 'headings-color' => '#0047bb', #ÖAW + 'headings-font-family' => "Alegreya,serif", + + 'dark' => '#5c6784', + 'light' => '#f5f5f5', #f6f6f6 + 'primary' => '#00122f', #ÖAW 0047bb + 'secondary' => '#9eaeb5', + 'info' => '#0355ad', #MediaWiki Buttons + 'danger' => '#910a00', + 'warning' => '#e39f00', + 'success' => '#009e4c', + + 'cmln-navbar-logo-height' => '1.0rem', + 'cmln-navbar-bg-color' => "light" +, + 'cmln-search-bar-btn-color' => "light", +# 'cmln-personal-tools-link' => "#dee1d2", +# 'cmln-personal-tools-link-new' => "#ffffff", + + 'navbar-light-color' => "#0047bb", #ÖAW + 'navbar-light-hover-color' => "#0099ff", + 'navbar-light-active-color' => "#0355ad", + 'navbar-padding-y' => '1.0rem', +# 'navbar-padding-x' => '1rem', + + 'dropdown-link-hover-bg' => '#0355ad', #should be light + 'dropdown-link-hover-color' => "#f5f5f5", + 'dropdown-link-active-color' => "#ffffff", + 'dropdown-link-active-bg' => "#0355ad", + 'dropdown-link-color' => '#0355ad', + + +# 'cmln-collapse-point' => '800px', + 'font-size-base' => '1.0rem', + 'h1-font-size' => '1.8rem', + 'h2-font-size' => '1.6rem', + 'h3-font-size' => '1.4rem', + 'h4-font-size' => '1.2rem', + 'h5-font-size' => '1.2rem', + 'cmln-link-formats' => "(new: ('color': #f60000, 'hover-color': #6e0000), stub: #0099ff #007aff +#10345a underline, extiw: #1b599b none #10345a underline, external: #044eae #ff0000 #2d125d underline)", + + 'jumbotron-bg' => '#f0f0f0', + 'card-cap-bg' => '#f0f0f0', + 'card-spacer-y' => '0.5rem', + 'card-spacer-x' => '1rem', + + + 'table-cell-padding-sm' => '0.2rem', + +]; + +# Other enabled skins. +# The following skins were automatically enabled: +wfLoadSkin( 'MonoBook' ); +wfLoadSkin( 'Timeless' ); +wfLoadSkin( 'Vector' ); +wfLoadSkin( 'Tweeki' ); + +/// Extensions MyWikis +wfLoadExtension( 'CategoryTree' ); +wfLoadExtension( 'Cite' ); +wfLoadExtension( 'CiteThisPage' ); +wfLoadExtension( 'CodeEditor' ); +wfLoadExtension( 'ConfirmEdit' ); +wfLoadExtension( 'Gadgets' ); +wfLoadExtension( 'ImageMap' ); +wfLoadExtension( 'InputBox' ); +wfLoadExtension( 'Interwiki' ); +wfLoadExtension( 'LocalisationUpdate' ); +//wfLoadExtension( 'MultimediaViewer' ); //requires a patch +wfLoadExtension( 'Nuke' ); +wfLoadExtension( 'OATHAuth' ); +wfLoadExtension( 'PageImages' ); +wfLoadExtension( 'ParserFunctions' ); +$wgPFEnableStringFunctions = true; +$wgPFStringLengthLimit = 10000; +wfLoadExtension( 'PdfHandler' ); +wfLoadExtension( 'Poem' ); +wfLoadExtension( 'Renameuser' ); +wfLoadExtension( 'ReplaceText' ); +wfLoadExtension( 'Scribunto' ); +wfLoadExtension( 'SecureLinkFixer' ); +wfLoadExtension( 'SyntaxHighlight_GeSHi' ); +wfLoadExtension( 'TemplateData' ); +wfLoadExtension( 'TextExtracts' ); +wfLoadExtension( 'WikiEditor' ); + +$wgPFEnableStringFunctions = true; +$wgScribuntoDefaultEngine = 'luasandbox'; + +/// Extensions KM-A +# Semantic Result Formats via Composer +# More info: https://semantic-mediawiki.org/wiki/Semantic_Result_Formats +$srfgFormats[] = 'incoming'; +$srfgMapProvider='BasemapAT.basemap'; +wfLoadExtension( 'SemanticResultFormats' ); +$srfgMapProvider='OpenStreetMap.Mapnik'; +# Modern Timeline +# More info: https://github.com/ProfessionalWiki/ModernTimeline +wfLoadExtension( 'ModernTimeline' ); + +#Network +wfLoadExtension( 'Network' ); + +# Maps COMPOSER +wfLoadExtension( 'Maps' ); +$egMapsEnableCategory = false; +//require_once __DIR__ . '/extensions/Maps/DefaultSettings.php'; +$egMapsDefaultService = 'leaflet'; + +#Mermaid +# More info: https://github.com/SemanticMediaWiki/Mermaid +wfLoadExtension( 'Mermaid' ); +$mermaidgDefaultTheme = 'forest'; + +# Semantic Compound Queries via Composer +# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries +wfLoadExtension( 'SemanticCompoundQueries' ); + +# Semantic Extra Special Properties +# More info: https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties +wfLoadExtension( 'SemanticExtraSpecialProperties' ); +$sespgEnabledPropertyList = [ + '_CUSER', + '_PAGEID', + '_REVID', + '_NSNAME', + '_SUBP', + '_EXIFDATA', +]; +$sespgUseFixedTables = true; +$wgDisableCounters = false; + +# SemanticMetaTags +# More info: https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Meta_Tags +wfLoadExtension( 'SemanticMetaTags' ); +$GLOBALS['smtgTagsProperties'] = [ + // Standard meta tags + 'keywords' => [ + 'Numismatic keyword', 'Keyword' + ], + 'title' => 'Pagename', + 'description' => 'Grand document', + 'author' => 'Author', + // Summary card tag + 'twitter:title' => 'Pagename', + 'twitter:description' => 'Category', + 'twitter:image' => 'Image URL', + // Open Graph protocol supported tag + 'og:title' => 'Pagename', + 'og:image' => 'Image URL', +]; +$GLOBALS['smtgMetaPropertyPrefixes'] = [ + // Open Graph prefixes + 'og:', + 'fb:' +]; + +# Lingo und Semantic Glossary via Composer +wfLoadExtension( 'Lingo' ); +wfLoadExtension( 'SemanticGlossary' ); +$wgexLingoCacheType = CACHE_NONE; + +// Add custom namespaces. No "-" allowed in names. +define("NS_GLOSSARY", 190); +define("NS_GLOSSARY_TALK", 191); + +$wgExtraNamespaces[NS_GLOSSARY] = "Glossary"; +$wgExtraNamespaces[NS_GLOSSARY_TALK] = "Glossary_talk"; +$wgexLingoPage = 'Glossary'; +$smwgNamespacesWithSemanticLinks[NS_GLOSSARY] = true; + +define("NS_FINA", 3000); +define("NS_FINA_TALK", 3000); +$wgExtraNamespaces[NS_FINA] = "FINA"; +$wgExtraNamespaces[NS_FINA_TALK] = "FINA_talk"; +$smwgNamespacesWithSemanticLinks[NS_FINA] = true; +$smwgNamespacesWithSemanticLinks[NS_FINA_TALK] = true; +$wgNamespacesToBeSearchedDefault[NS_FINA] = true; +$wgNamespacesToBeSearchedDefault[NS_FINA_TALK] = false; + +# Semantic Drilldown +# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown +wfLoadExtension( 'SemanticDrilldown' ); +$sdgShowCategoriesAsTabs = true; +$sdgNumResultsPerPage = 500; +$sdgMinValuesForComboBox=50; +$sdgHideCategoriesByDefault = true; + +# SemanticCite +# More info: https://github.com/SemanticMediaWiki/SemanticCite/ +wfLoadExtension( 'SemanticCite' ); + +# SemanticTasks +# version 2.0.1 conflicting mediawiki 4 +# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Tasks +wfLoadExtension( 'SemanticTasks' ); +$wgSemanticTasksNotifyIfUnassigned = true; + +# Semantic Dependency Updater +# More info: https://www.mediawiki.org/wiki/Extension:SemanticDependencyUpdater +wfLoadExtension( 'SemanticDependencyUpdater' ); + +# Page Forms +# More info: https://www.mediawiki.org/wiki/Extension:Page_Forms +wfLoadExtension( 'PageForms' ); +$wgPageFormsRenameEditTabs = true; +$sfgRenameEditTabs = true; +$wgPageFormsLinkAllRedLinksToForms = false; +$wgPageFormsRedLinksCheckOnlyLocalProps = true; +$wgGroupPermissions['*']['viewedittab'] = false; +$wgGroupPermissions['sysop']['viewedittab'] = true; +$wgPageFormsSimpleUpload = true; + +#### INTERFACE + +# HeaderTabs +# More info: https://www.mediawiki.org/wiki/Extension:Header_Tabs +wfLoadExtension( 'HeaderTabs' ); +$wgHeaderTabsRenderSingleTab = true; +$wgHeaderTabsEditTabLink = false; +#$wgHeaderTabsStyle = 'bare'; + +# Widgets +# More info: https://www.mediawiki.org/wiki/Extension:Widgets +wfLoadExtension( 'Widgets' ); +// $wgWidgetsCompileDir = __DIR__ . '/../extensions/Widgets/compiled_templates/'; + +# TitleIcon +# More info: https://www.mediawiki.org/wiki/Extension:Title_Icon +wfLoadExtension( 'TitleIcon' ); +$wgTitleIcon_EnableIconInSearchTitle = true; + +#Shariff +# More info: https://github.com/vonloxley/Shariff-Mediawiki +#wfLoadExtension('Shariff'); + +#NativeSvgHandler +# More info: https://www.mediawiki.org/wiki/Extension:NativeSvgHandler +wfLoadExtension( 'NativeSvgHandler' ); + +#Link Target +# More info: https://www.mediawiki.org/wiki/Extension:LinkTarget +wfLoadExtension( 'LinkTarget' ); +# $wgLinkTargetParentClasses = ' /*ENTER SOME CLASSES HERE*/ '; + +#CookieWarning +# https://github.com/wikimedia/mediawiki-extensions-CookieWarning.git +wfLoadExtension( 'CookieWarning' ); +$wgCookieWarningEnabled = false; + +#MPDF +# More info: https://www.mediawiki.org/wiki/Extension:Mpdf +wfLoadExtension( 'Mpdf' ); +# Toolbox-Link klappt nicht wegen chameleon-skin +$wgMpdfToolboxLink = false; + +#Popups +# More info: https://www.mediawiki.org/wiki/Extension:Popups +wfLoadExtension( 'Popups' ); +$wgPopupsTextExtractsIntroOnly = false; +$wgExtractsRemoveClasses = [ + "script", + "input", + "style", + "ul.gallery", + ".mw-editsection", + "sup.reference", + "ol.references", + ".error", + ".nomobile", + ".noprint", + ".noexcerpt", + ".sortkey" + ]; + +#### HELPERS + +# External Data +# More info: +wfLoadExtension( 'ExternalData' ); + +# Data Transfer +# More info: https://www.mediawiki.org/wiki/Extension:Data_Transfer +wfLoadExtension( 'DataTransfer' ); +$wgPhpCli = false; + +# DeleteBatch +# More info: https://www.mediawiki.org/wiki/Extension:DeleteBatch +wfLoadExtension( 'DeleteBatch' ); + +# SimpleBatchUpload +# More info: https://www.mediawiki.org/wiki/Extension:SimpleBatchUpload +wfLoadExtension( 'SimpleBatchUpload' ); + +# Matomo Analytics +wfLoadExtension( 'MatomoAnalytics' ); +#$wgMatomoAnalyticsTokenAuth = "2035871c0dd9efca78b965299112c098"; +# 2035871c0dd9efca78b965299112c098 +$wgMatomoAnalyticsGlobalID = "7"; +$wgMatomoAnalyticsDisableCookie = "true"; +$wgMatomoAnalyticsDisableJS = "true"; +#Import users +#https://www.mediawiki.org/wiki/Extension:ImportUsers +wfLoadExtension( 'ImportUsers' ); + +#Who's Online +wfLoadExtension( 'WhosOnline' ); + +#Admin Links +wfLoadExtension( 'AdminLinks' ); + +#RottenLinks +#More info: https://www.mediawiki.org/wiki/Extension:RottenLinks +wfLoadExtension( 'RottenLinks' ); + +#RSS +wfLoadExtension( 'RSS' ); + +#MyVariables +wfLoadExtension( 'MyVariables' ); + +#Variables +wfLoadExtension( 'Variables' ); + +#UrlGetParameters +# https://www.mediawiki.org/wiki/Extension:UrlGetParameters +wfLoadExtension( 'UrlGetParameters' ); + +#RightFunctions +# More info: https://www.mediawiki.org/wiki/Extension:RightFunctions +wfLoadExtension( 'RightFunctions' ); + +#UserFunctions +# More info: https://www.mediawiki.org/wiki/Extension:UserFunctions +wfLoadExtension( 'UserFunctions' ); + +# Lockdown +wfLoadExtension( 'Lockdown' ); + +#CodeMirror +# more info: https://www.mediawiki.org/wiki/Extension:CodeMirror +wfLoadExtension( 'CodeMirror' ); +# Enables use of CodeMirror by default but still allow users to disable it +$wgDefaultUserOptions['usecodemirror'] = 1; + +# Enable bracket matching in CodeMirror +$wgCodeMirrorEnableBracketMatching = true; + +# Enable accessible colors in CodeMirror +$wgCodeMirrorAccessibilityColors = true; + +# Enable line numbering in CodeMirror +# defaults to the template namespace `[ NS_TEMPLATE ]` +# `null` enables it for all namespace +# [] for disabling everywhere +$wgCodeMirrorLineNumberingNamespaces = null; + +#wfLoadExtension( 'TemplateStyles' ); +#wfLoadExtension( 'PageProperties' ); + +$wgPagePropertiesDisableSidebarLink = true; + +// VisualEditor 1.35 patch fix for private wikis +if (!defined('MW_DB') && in_array($_SERVER['REMOTE_ADDR'], + [ + $_SERVER['SERVER_ADDR'], + // $_SERVER['HTTP_X_FORWARDED_FOR'], # for reverse proxies; disabled for now + '127.0.0.1', + 'localhost' + ])) { + $wgGroupPermissions['*']['read'] = true; + $wgGroupPermissions['*']['edit'] = true; + $wgGroupPermissions['*']['writeapi'] = true; +} diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 index 17d3c2866a51b..2531073e7dc8b --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,16 +1,16 @@ #!/bin/bash -cd /app/extensions/ +# install some tools apt-get update && apt-get install -y vim git links -git clone --depth 1 https://github.com/edwardspec/mediawiki-aws-s3.git AWS +# add extensions that cannot be introduced over the composer +cd /app/extensions/ +git clone --depth 1 https://github.com/edwardspec/mediawiki-aws-s3.git AWS git clone https://github.com/wikimedia/mediawiki-extensions-Elastica.git git clone https://github.com/wikimedia/mediawiki-extensions-CirrusSearch.git git clone https://github.com/wikimedia/mediawiki-extensions-AdvancedSearch.git - git clone https://github.com/mywikis/EmailLogger.git - git clone https://github.com/SemanticMediaWiki/SemanticDrilldown.git git clone https://github.com/gesinn-it/SemanticDependencyUpdater.git git clone https://github.com/wikimedia/mediawiki-extensions-HeaderTabs.git @@ -38,17 +38,19 @@ git clone https://github.com/wikimedia/mediawiki-extensions-Lockdown.git git clone https://github.com/wikimedia/mediawiki-extensions-CodeMirror.git git clone https://github.com/SemanticMediaWiki/SemanticTasks.git + +# add custom stuff from fina cp -r /app/custom/Kma /app/extensions/ cp -r /app/custom/MyWikisLocalConfig /app/extensions/ # this skin is missing and should be introduced over the custom dir or trough some other way # cp -r /app/custom/skins/Kma /app/skins/ +# set owner to herokuishuser chown -R herokuishuser:herokuishuser /app/extensions -cd /app - -su herokuishuser +cd / +# set path for php export PATH="/app/.heroku/php/bin:${PATH}" # Start web server