2 # DO NOT EDIT - This file is being maintained by Chef
 
   4 # Protect against web entry
 
   5 if ( !defined( 'MEDIAWIKI' ) ) {
 
   9 ## Uncomment this to disable output compression
 
  10 # $wgDisableOutputCompression = true;
 
  12 $wgSitename      = '<%= @mediawiki[:sitename] %>';
 
  13 $wgMetaNamespace = '<%= @mediawiki[:metanamespace] %>';
 
  15 ## The URL base path to the directory containing the wiki;
 
  16 ## defaults for all runtime URL paths are based off of this.
 
  17 ## For more information on customizing the URLs
 
  18 ## (like /w/index.php/Page_title to /wiki/Page_title) please see:
 
  19 ## http://www.mediawiki.org/wiki/Manual:Short_URL
 
  21 $wgArticlePath      = '/wiki/$1';
 
  22 $wgUsePathInfo      = true;
 
  23 $wgScriptExtension  = ".php";
 
  25 ## The protocol and server name to use in fully-qualified URLs
 
  26 $wgServer           = "//<%= @name %>";
 
  27 $wgInternalServer   = 'http://<%= @name %>';
 
  29 <% if @mediawiki[:ssl_enabled] -%>
 
  30 $wgSecureLogin = true;
 
  31 $wgDefaultUserOptions['prefershttps'] = 0;
 
  33 $wgCookieSecure = false;
 
  35 ## The relative URL path to the skins directory
 
  36 $wgStylePath        = "$wgScriptPath/skins";
 
  38 ## The relative URL path to the logo.  Make sure you change this from the default,
 
  39 ## or else you'll overwrite your logo when you upgrade!
 
  40 $wgLogo             = "<%= @mediawiki[:logo] %>";
 
  42 ## UPO means: this is also a user preference option
 
  44 $wgEnableEmail      = true;
 
  45 $wgEnableUserEmail  = true; # UPO
 
  47 $wgEmergencyContact = "<%= @mediawiki[:email_contact] %>";
 
  48 $wgPasswordSender   = "<%= @mediawiki[:email_sender] %>";
 
  49 $wgPasswordSenderName = "<%= @mediawiki[:email_sender_name] %>"; //Replaced by MediaWiki:Emailsender in v1.23.0
 
  51 $wgEnotifUserTalk      = true; # UPO
 
  52 $wgEnotifWatchlist     = true; # UPO
 
  53 $wgEmailAuthentication = true;
 
  55 $wgEnotifUseJobQ       = true;
 
  59 $wgDBserver         = "<%= @database_params[:host] %>";
 
  60 $wgDBname           = "<%= @database_params[:name] %>";
 
  61 $wgDBuser           = "<%= @database_params[:username] %>";
 
  62 $wgDBpassword       = "<%= @database_params[:password] %>";
 
  64 # MySQL specific settings
 
  67 # MySQL table options to use during installation or update
 
  68 $wgDBTableOptions   = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
 
  70 # Experimental charset support for MySQL 5.0.
 
  73 ## Shared memory settings
 
  74 $wgMainCacheType    = CACHE_MEMCACHED;
 
  75 $wgMemCachedServers = array('127.0.0.1:11211');
 
  76 $wgSessionsInObjectCache = TRUE;
 
  78 ## To enable image uploads, make sure the 'images' directory
 
  79 ## is writable, then set this to true:
 
  80 $wgEnableUploads  = true;
 
  81 $wgUseImageMagick = true;
 
  82 $wgImageMagickConvertCommand = "/usr/bin/convert";
 
  84 $wgGenerateThumbnailOnParse = false;
 
  85 $wgMaxImageArea = 125000000;
 
  86 $wgMaxShellMemory = 5524000;
 
  87 $wgMaxShellFileSize = 819200;
 
  88 $wgMaxShellTime = 360;
 
  89 $wgMaxShellWallClockTime = 360;
 
  91 # Allow some more upload extensions
 
  92 $wgFileExtensions[] = 'doc';
 
  93 $wgFileExtensions[] = 'pdf';
 
  94 $wgFileExtensions[] = 'odt';
 
  95 $wgFileExtensions[] = 'odp';
 
  96 $wgFileExtensions[] = 'svg';
 
  97 <% @mediawiki[:extra_file_extensions].each do |mw_extra_file_extension| -%>
 
  98         $wgFileExtensions[] = '<%= mw_extra_file_extension %>';
 
 101 $wgSVGConverters = array( 'rsvg' => '/usr/bin/rsvg-convert -w $width -h $height -o $output $input');
 
 102 $wgSVGConverter = 'rsvg';
 
 103 $wgSVGMaxSize = 2000;
 
 105 # InstantCommons allows wiki to use images from http://commons.wikimedia.org
 
 106 <% if @mediawiki[:commons] -%>
 
 107 $wgUseInstantCommons  = true;
 
 109 $wgUseInstantCommons  = false;
 
 112 ## If you use ImageMagick (or any other shell command) on a
 
 113 ## Linux server, this will need to be set to the name of an
 
 114 ## available UTF-8 locale
 
 115 $wgShellLocale = "en_US.utf8";
 
 117 ## If you want to use image uploads under safe mode,
 
 118 ## create the directories images/archive, images/thumb and
 
 119 ## images/temp, and make them all writable. Then uncomment
 
 120 ## this, if it's not already uncommented:
 
 121 #$wgHashedUploadDirectory = false;
 
 123 ## Set $wgCacheDirectory to a writable directory on the web server
 
 124 ## to make your wiki go slightly faster. The directory should not
 
 125 ## be publically accessible from the web.
 
 126 #$wgCacheDirectory = "$IP/cache";
 
 128 # Site language code, should be one of the list in ./languages/Names.php
 
 129 $wgLanguageCode = "en";
 
 131 $wgSecretKey = '<%= @node[:mediawiki][:sites][@name][:wgSecretKey] %>';
 
 133 # Site upgrade key. Must be set to a string (default provided) to turn on the
 
 134 # web installer while LocalSettings.php is in place
 
 135 #$wgUpgradeKey = "6ad907e74fc65836";
 
 137 ## Default skin: you can change the default skin. Use the internal symbolic
 
 138 ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook', 'vector':
 
 139 $wgDefaultSkin = "<%= @mediawiki[:skin] %>";
 
 141 ## For attaching licensing metadata to pages, and displaying an
 
 142 ## appropriate copyright notice / icon. GNU Free Documentation
 
 143 ## License and Creative Commons licenses are supported so far.
 
 144 $wgRightsPage = "Wiki_content_license"; # Set to the title of a wiki page that describes your license/copyright
 
 145 $wgRightsUrl  = "http://creativecommons.org/licenses/by-sa/2.0/";
 
 146 $wgRightsText = "Creative Commons Attribution-ShareAlike 2.0 license";
 
 147 $wgRightsIcon = "/cc-wiki.png";
 
 149 # Path to the GNU diff3 utility. Used for conflict resolution.
 
 150 $wgDiff3 = "/usr/bin/diff3";
 
 152 $wgExternalDiffEngine = 'wikidiff2';
 
 154 # Query string length limit for ResourceLoader. You should only set this if
 
 155 # your web server has a query string length limit (then set it to that limit),
 
 156 # or if you have suhosin.get.max_value_length set in php.ini (then set it to
 
 158 $wgResourceLoaderMaxQueryLength = -1;
 
 160 # End of automatically generated settings.
 
 161 # Add more configuration options below.
 
 163 #Only Allow Signed-in users to edit
 
 164 $wgGroupPermissions['*']['edit'] = false;
 
 166 #Only allow autoconfirmed for a few actions
 
 167 $wgGroupPermissions['user']['move'] = false;
 
 168 $wgGroupPermissions['user']['movefile'] = false;
 
 169 $wgGroupPermissions['user']['move-categorypages'] = false;
 
 170 $wgGroupPermissions['user']['upload'] = false;
 
 171 $wgGroupPermissions['autoconfirmed']['move'] = true;
 
 172 $wgGroupPermissions['autoconfirmed']['movefile'] = true;
 
 173 $wgGroupPermissions['autoconfirmed']['move-categorypages'] = true;
 
 174 $wgGroupPermissions['autoconfirmed']['upload'] = true;
 
 176 #Allow bureaucrat group access to oversight options
 
 177 $wgGroupPermissions['bureaucrat']['hideuser'] = true;
 
 178 $wgGroupPermissions['bureaucrat']['deletelogentry'] = true;
 
 179 $wgGroupPermissions['bureaucrat']['deleterevision'] = true;
 
 180 $wgGroupPermissions['bureaucrat']['suppressrevision'] = true;
 
 181 $wgGroupPermissions['bureaucrat']['suppressionlog'] = true;
 
 183 <% if @mediawiki[:private_accounts] -%>
 
 184 #Prevent new user registrations except by existing users
 
 185 $wgGroupPermissions['*']['createaccount'] = false;
 
 186 $wgGroupPermissions['user']['createaccount'] = true;
 
 188 <% if @mediawiki[:private] -%>
 
 190 #Disable reading by anonymous users
 
 191 $wgGroupPermissions['*']['read'] = false;
 
 193 #Allow anonymous users to access the login page
 
 194 $wgWhitelistRead = array ("Special:Userlogin");
 
 196 #Prevent new user registrations except by sysops
 
 197 $wgGroupPermissions['*']['createaccount'] = false;
 
 199 #Restrict access to the upload directory
 
 200 $wgUploadPath = "$wgScriptPath/img_auth.php";
 
 203 #Allow Subpages on Main Namespace
 
 204 $wgNamespacesWithSubpages[NS_MAIN] = true;
 
 206 #DNS Blacklists to use
 
 207 $wgEnableDnsBlacklist = true;
 
 208 $wgDnsBlacklistUrls = array( 'proxies.dnsbl.sorbs.net.', 'opm.tornevall.org.', 'xbl.spamhaus.org.', 'dnsbl-3.uceprotect.net.' );
 
 210 #Require validated email to edit
 
 211 $wgEmailConfirmToEdit = true;
 
 213 # Extend autoblock period
 
 214 $wgAutoblockExpiry = 7776000; // 90 days
 
 217 $wgSpamRegex = '/\b(gmail|dell|asus|eps(o|0)n|br(o|0)ther|can(o|0)n|hp|k(o|0)dak|lexmark|mcafee|bitdefender|n(o|0)rt(o|0)n( 360)?|avira|kaspersky|avg|avast|micr(o|0)s(o|0)ft|(o|0)utl(o|0)(o|0)k|printer|netgear( r(o|0)uter)?|quickb(o|0)(o|0)ks( payr(o|0)ll)?)( antivirus)?( helpline| cust(o|0)mer|( technical| tech)| cust(o|0)mer service)? (supp(o|0)rt number|ph(o|0)ne number|supp(o|0)rt ph(o|0)ne number|care number|helpdesk number)\b/i';
 
 219 #Autopromote users to autoconfirmed
 
 220 $wgAutoConfirmAge = 345600; // 4 days
 
 221 $wgAutoConfirmCount = 10;
 
 223 #Disable Hit Counter for Performance
 
 224 $wgDisableCounters = TRUE;
 
 225 #Disable IP in Header to avoid cache issue
 
 226 $wgShowIPinHeader = FALSE;
 
 231 # Allow external images from a few sites
 
 232 $wgAllowExternalImagesFrom = array( 'http://tile.openstreetmap.org/', 'http://svenanders.openstreetmap.de/', 'http://josm.openstreetmap.de/', 'http://trac.openstreetmap.org/', 'http://rweait.dev.openstreetmap.org/' );
 
 234 $wgNoFollowDomainExceptions = array( 'www.openstreetmap.org', 'josm.openstreetmap.de', 'taginfo.openstreetmap.org', 'blog.openstreetmap.org', 'wiki.osmfoundation.org' );
 
 236 #FIXME - move to specific
 
 237 $wgForceUIMsgAsContentMsg = array( 'mainpage-url', 'portal-url', 'mapfeatures-url', 'helppage' );
 
 239 #FIXME - move to specific
 
 240 $wgAllowUserJs = TRUE;
 
 241 $wgAllowUserCss = TRUE;
 
 243 #FIXME - move to specific
 
 245 define('NS_LANG_DE', 200);
 
 246 $wgExtraNamespaces[NS_LANG_DE] = 'DE';
 
 247 $wgNamespacesWithSubpages[NS_LANG_DE] = TRUE;
 
 248 $wgContentNamespaces[] = NS_LANG_DE;
 
 249 define('NS_LANG_DE_TALK', 201);
 
 250 $wgExtraNamespaces[NS_LANG_DE_TALK] = 'DE_talk';
 
 251 $wgNamespacesWithSubpages[NS_LANG_DE_TALK] = TRUE;
 
 254 define('NS_LANG_FR', 202);
 
 255 $wgExtraNamespaces[NS_LANG_FR] = 'FR';
 
 256 $wgNamespacesWithSubpages[NS_LANG_FR] = TRUE;
 
 257 $wgContentNamespaces[] = NS_LANG_FR;
 
 258 define('NS_LANG_FR_TALK', 203);
 
 259 $wgExtraNamespaces[NS_LANG_FR_TALK] = 'FR_talk';
 
 260 $wgNamespacesWithSubpages[NS_LANG_FR_TALK] = TRUE;
 
 263 define('NS_LANG_ES', 204);
 
 264 $wgExtraNamespaces[NS_LANG_ES] = 'ES';
 
 265 $wgNamespacesWithSubpages[NS_LANG_ES] = TRUE;
 
 266 $wgContentNamespaces[] = NS_LANG_ES;
 
 267 define('NS_LANG_ES_TALK', 205);
 
 268 $wgExtraNamespaces[NS_LANG_ES_TALK] = 'ES_talk';
 
 269 $wgNamespacesWithSubpages[NS_LANG_ES_TALK] = TRUE;
 
 272 define('NS_LANG_IT', 206);
 
 273 $wgExtraNamespaces[NS_LANG_IT] = 'IT';
 
 274 $wgNamespacesWithSubpages[NS_LANG_IT] = TRUE;
 
 275 $wgContentNamespaces[] = NS_LANG_IT;
 
 276 define('NS_LANG_IT_TALK', 207);
 
 277 $wgExtraNamespaces[NS_LANG_IT_TALK] = 'IT_talk';
 
 278 $wgNamespacesWithSubpages[NS_LANG_IT_TALK] = TRUE;
 
 281 define('NS_LANG_NL', 208);
 
 282 $wgExtraNamespaces[NS_LANG_NL] = 'NL';
 
 283 $wgNamespacesWithSubpages[NS_LANG_NL] = TRUE;
 
 284 $wgContentNamespaces[] = NS_LANG_NL;
 
 285 define('NS_LANG_NL_TALK', 209);
 
 286 $wgExtraNamespaces[NS_LANG_NL_TALK] = 'NL_talk';
 
 287 $wgNamespacesWithSubpages[NS_LANG_NL_TALK] = TRUE;
 
 290 define('NS_LANG_RU', 210);
 
 291 $wgExtraNamespaces[NS_LANG_RU] = 'RU';
 
 292 $wgNamespacesWithSubpages[NS_LANG_RU] = TRUE;
 
 293 $wgContentNamespaces[] = NS_LANG_RU;
 
 294 define('NS_LANG_RU_TALK', 211);
 
 295 $wgExtraNamespaces[NS_LANG_RU_TALK] = 'RU_talk';
 
 296 $wgNamespacesWithSubpages[NS_LANG_RU_TALK] = TRUE;
 
 299 define('NS_LANG_JA', 212);
 
 300 $wgExtraNamespaces[NS_LANG_JA] = 'JA';
 
 301 $wgNamespacesWithSubpages[NS_LANG_JA] = TRUE;
 
 302 $wgContentNamespaces[] = NS_LANG_JA;
 
 303 define('NS_LANG_JA_TALK', 213);
 
 304 $wgExtraNamespaces[NS_LANG_JA_TALK] = 'JA_talk';
 
 305 $wgNamespacesWithSubpages[NS_LANG_JA_TALK] = TRUE;
 
 307 $wgNamespacesToBeSearchedDefault[NS_LANG_DE] = TRUE;
 
 308 $wgNamespacesToBeSearchedDefault[NS_LANG_FR] = TRUE;
 
 309 $wgNamespacesToBeSearchedDefault[NS_LANG_ES] = TRUE;
 
 310 $wgNamespacesToBeSearchedDefault[NS_LANG_IT] = TRUE;
 
 311 $wgNamespacesToBeSearchedDefault[NS_LANG_NL] = TRUE;
 
 312 $wgNamespacesToBeSearchedDefault[NS_LANG_RU] = TRUE;
 
 313 $wgNamespacesToBeSearchedDefault[NS_LANG_JA] = TRUE;
 
 315 <% if @mediawiki[:site_notice] -%>
 
 316 $wgSiteNotice = "<%= @mediawiki[:site_notice] %>";
 
 318 <% if @mediawiki[:site_readonly] -%>
 
 319 $wgReadOnly = "<%= @mediawiki[:site_readonly] %>";
 
 322 <% Dir.glob("#{@directory}/LocalSettings.d/*.php") do |file| -%>
 
 323 <%= "require_once('#{file}');" %>