$wgServer = '';
/** @cond file_level_code */
-if( isset( $_SERVER['SERVER_NAME'] ) ) {
+if( isset( $_SERVER['SERVER_NAME'] )
+ # additionially, for requests made directly to an IPv6 address we have
+ # to make sure the server enclose it in either [] or nothing at all
+ && (strpos($_SERVER['SERVER_NAME'], '[')
+ xor strpos( $_SERVER['SERVER_NAME'], ']'))
+ ) {
$serverName = $_SERVER['SERVER_NAME'];
} elseif( isset( $_SERVER['HOSTNAME'] ) ) {
$serverName = $_SERVER['HOSTNAME'];
* for non-specified types.
*
* For example:
- * $wgUploadSize = array(
+ * $wgMaxUploadSize = array(
* '*' => 250 * 1024,
* 'url' => 500 * 1024,
* );
'text/scriptlet', 'application/x-msdownload',
# Windows metafile, client-side vulnerability on some systems
'application/x-msmetafile',
- # A ZIP file may be a valid Java archive containing an applet which exploits the
- # same-origin policy to steal cookies
- 'application/zip',
-
- # MS Office OpenXML and other Open Package Conventions files are zip files
- # and thus blacklisted just as other zip files. If you remove these entries
- # from the blacklist in your local configuration, a malicious file upload
- # will be able to compromise the wiki's user accounts, and the user
- # accounts of any other website in the same cookie domain.
- 'application/x-opc+zip',
- 'application/msword',
- 'application/vnd.ms-powerpoint',
- 'application/vnd.msexcel',
);
+/**
+ * Allow Java archive uploads.
+ * This is not recommended for public wikis since a maliciously-constructed
+ * applet running on the same domain as the wiki can steal the user's cookies.
+ */
+$wgAllowJavaUploads = false;
+
/**
* This is a flag to determine whether or not to check file extensions on upload.
*
* necessary to rasterize SVGs to PNG as a fallback format.
*
* An external program is required to perform this conversion.
+ * If set to an array, the first item is a PHP callable and any further items
+ * are passed as parameters after $srcPath, $dstPath, $width, $height
*/
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg -w$width -h$height $input $output',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
+ 'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ),
);
/** Pick a converter defined in $wgSVGConverters */
$wgSVGConverter = 'ImageMagick';
$wgSVGConverterPath = '';
/** Don't scale a SVG larger than this */
$wgSVGMaxSize = 2048;
+/** Don't read SVG metadata beyond this point.
+ * Default is 1024*256 bytes */
+$wgSVGMetadataCutoff = 262144;
/**
* MediaWiki will reject HTMLesque tags in uploaded files due to idiotic browsers which can't
'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
- 'captionLength' => 20, // Length of caption to truncate (in characters)
+ 'captionLength' => 25, // Length of caption to truncate (in characters)
'showBytes' => true, // Show the filesize in bytes in categories
);
* - CACHE_DBA: Use PHP's DBA extension to store in a DBM-style
* database. This is slow, and is not recommended for
* anything other than debugging.
+ * - (other): A string may be used which identifies a cache
+ * configuration in $wgObjectCaches.
*
* @see $wgMessageCacheType, $wgParserCacheType
*/
*/
$wgParserCacheType = CACHE_ANYTHING;
+/**
+ * Advanced object cache configuration.
+ *
+ * Use this to define the class names and constructor parameters which are used
+ * for the various cache types. Custom cache types may be defined here and
+ * referenced from $wgMainCacheType, $wgMessageCacheType or $wgParserCacheType.
+ *
+ * The format is an associative array where the key is a cache identifier, and
+ * the value is an associative array of parameters. The "class" parameter is the
+ * class name which will be used. Alternatively, a "factory" parameter may be
+ * given, giving a callable function which will generate a suitable cache object.
+ *
+ * The other parameters are dependent on the class used.
+ */
+$wgObjectCaches = array(
+ CACHE_NONE => array( 'class' => 'EmptyBagOStuff' ),
+ CACHE_DB => array( 'class' => 'SqlBagOStuff', 'table' => 'objectcache' ),
+ CACHE_DBA => array( 'class' => 'DBABagOStuff' ),
+
+ CACHE_ANYTHING => array( 'factory' => 'ObjectCache::newAnything' ),
+ CACHE_ACCEL => array( 'factory' => 'ObjectCache::newAccelerator' ),
+ CACHE_MEMCACHED => array( 'factory' => 'ObjectCache::newMemcached' ),
+
+ 'eaccelerator' => array( 'class' => 'eAccelBagOStuff' ),
+ 'apc' => array( 'class' => 'APCBagOStuff' ),
+ 'xcache' => array( 'class' => 'XCacheBagOStuff' ),
+ 'wincache' => array( 'class' => 'WinCacheBagOStuff' ),
+ 'memcached-php' => array( 'class' => 'MemcachedPhpBagOStuff' ),
+);
+
/**
* The expiry time for the parser cache, in seconds. The default is 86.4k
* seconds, otherwise known as a day.
* $wgInternalServer = 'http://yourinternal.tld:8000';
* </code>
*/
-$wgInternalServer = $wgServer;
+$wgInternalServer = false;
/**
* Cache timeout for the squid, will be sent as s-maxage (without ESI) or
* not, use only HTML 4-compatible IDs. This option is for testing -- when the
* functionality is ready, it will be on by default with no option.
*
- * Currently this appears to work fine in Chrome 4 and 5, Firefox 3.5 and 3.6, IE6
- * and 8, and Opera 10.50, but it fails in Opera 10.10: Unicode IDs don't seem
- * to work as anchors. So not quite ready for general use yet.
+ * Currently this appears to work fine in all browsers, but it's disabled by
+ * default because it normalizes id's a bit too aggressively, breaking preexisting
+ * content (particularly Cite). See bug 27733, bug 27694, bug 27474.
*/
-$wgExperimentalHtmlIds = true;
+$wgExperimentalHtmlIds = false;
/**
* Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
$wgResourceLoaderUseESI = false;
/**
- * Enable removal of some of the vertical whitespace (like \r and \n) from
- * JavaScript code when minifying.
+ * Put each statement on its own line when minifying JavaScript. This makes
+ * debugging in non-debug mode a bit easier.
+ */
+$wgResourceLoaderMinifierStatementsOnOwnLine = false;
+
+/**
+ * Maximum line length when minifying JavaScript. This is not a hard maximum:
+ * the minifier will try not to produce lines longer than this, but may be
+ * forced to do so in certain cases.
+ */
+$wgResourceLoaderMinifierMaxLineLength = 1000;
+
+/**
+ * Whether to include the mediawiki.legacy JS library (old wikibits.js), and its
+ * dependencies
*/
-$wgResourceLoaderMinifyJSVerticalSpace = false;
+$wgIncludeLegacyJavaScript = true;
/** @} */ # End of resource loader settings }
* @{
*/
-/** Allow sysops to ban logged-in users */
+/**
+ * Allow sysops to ban logged-in users
+ * @deprecated since 1.18
+ */
$wgSysopUserBans = true;
-/** Allow sysops to ban IP ranges */
+/**
+ * Allow sysops to ban IP ranges
+ * @deprecated since 1.18; set $wgBlockCIDRLimit to array( 'IPv4' => 32, 'IPv6 => 128 ) instead.
+ */
$wgSysopRangeBans = true;
/**
$wgGroupPermissions['sysop']['protect'] = true;
$wgGroupPermissions['sysop']['proxyunbannable'] = true;
$wgGroupPermissions['sysop']['rollback'] = true;
-$wgGroupPermissions['sysop']['trackback'] = true;
$wgGroupPermissions['sysop']['upload'] = true;
$wgGroupPermissions['sysop']['reupload'] = true;
$wgGroupPermissions['sysop']['reupload-shared'] = true;
$wgGroupPermissions['sysop']['unblockself'] = true;
$wgGroupPermissions['sysop']['suppressredirect'] = true;
#$wgGroupPermissions['sysop']['mergehistory'] = true;
+#$wgGroupPermissions['sysop']['trackback'] = true;
// Permission to change users' group assignments
$wgGroupPermissions['bureaucrat']['userrights'] = true;
* You probably shouldn't change this.
* Translated through restriction-* messages.
* Title::getRestrictionTypes() will remove restrictions that are not
- * applicable to a specific title (upload currently)
+ * applicable to a specific title (create and upload)
*/
-$wgRestrictionTypes = array( 'edit', 'move', 'upload' );
+$wgRestrictionTypes = array( 'create', 'edit', 'move', 'upload' );
/**
* Rights which can be required for each protection level (via action=protect)
* Set authentication cookies to HttpOnly to prevent access by JavaScript,
* in browsers that support this feature. This can mitigates some classes of
* XSS attack.
- *
- * Only supported on PHP 5.2 or higher.
*/
-$wgCookieHttpOnly = version_compare("5.2", PHP_VERSION, "<");
+$wgCookieHttpOnly = true;
/**
* If the requesting browser matches a regex in this blacklist, we won't
*/
$wgStatsMethod = 'cache';
+/**
+ * When $wgStatsMethod is 'udp', setting this to a string allows statistics to
+ * be aggregated over more than one wiki. The string will be used in place of
+ * the DB name in outgoing UDP packets. If this is set to false, the DB name
+ * will be used.
+ */
+$wgAggregateStatsID = false;
+
/** Whereas to count the number of time an article is viewed.
* Does not work if pages are cached (for example with squid).
*/
/**
* Support blog-style "trackbacks" for articles. See
* http://www.sixapart.com/pronet/docs/trackback_spec for details.
+ *
+ * If enabling this, you also need to grant the 'trackback' right to a group
*/
$wgUseTrackbacks = false;
/**
* Regexp to match word boundaries, defaults for non-CJK languages
* should be empty for CJK since the words are not separate
- *
- * @todo FIXME: checks for lower than required PHP version (5.1.x).
*/
-$wgSearchHighlightBoundaries = version_compare("5.1", PHP_VERSION, "<")? '[\p{Z}\p{P}\p{C}]'
- : '[ ,.;:!?~!@#$%\^&*\(\)+=\-\\|\[\]"\'<>\n\r\/{}]'; // PHP 5.0 workaround
+$wgSearchHighlightBoundaries = '[\p{Z}\p{P}\p{C}]';
/**
* Set to true to have the search engine count total
/**
* Authentication plugin.
+ * @var AuthPlugin
*/
$wgAuth = null;
'uploadFromUrl' => 'UploadFromUrlJob',
);
+/**
+ * Extensions of "thumbnails" that are very expensive to regenerate and should be
+ * excluded from normal action=purge thumbnail removal.
+ */
+$wgExcludeFromThumbnailPurge = array();
+
+/**
+
+ * Jobs that must be explicitly requested, i.e. aren't run by job runners unless special flags are set.
+ *
+ * These can be:
+ * - Very long-running jobs.
+ * - Jobs that you would never want to run as part of a page rendering request.
+ * - Jobs that you want to run on specialized machines ( like transcoding, or a particular
+ * machine on your cluster has 'outside' web access you could restrict uploadFromUrl )
+ */
+$wgJobTypesExcludedFromDefaultQueue = array();
+
/**
* Additional functions to be performed with updateSpecialPages.
* Expensive Querypages are already updated.
'Listusers' => 'users',
'Activeusers' => 'users',
'Listgrouprights' => 'users',
- 'Ipblocklist' => 'users',
+ 'BlockList' => 'users',
'Contributions' => 'users',
'Emailuser' => 'users',
'Listadmins' => 'users',
'Listbots' => 'users',
'Userrights' => 'users',
- 'Blockip' => 'users',
+ 'Block' => 'users',
+ 'Unblock' => 'users',
'Preferences' => 'users',
'Resetpass' => 'users',
'DeletedContributions' => 'users',
/**
* Disable redirects to special pages and interwiki redirects, which use a 302
- * and have no "redirected from" link.
+ * and have no "redirected from" link. Note this is only for articles with #Redirect
+ * in them. URL's containing a local interwiki prefix (or a non-canonical special
+ * page name) are still hard redirected regardless of this setting.
*/
$wgDisableHardRedirects = false;