initialize array before preg_match*
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index ead20d4..f4e6027 100644 (file)
@@ -28,7 +28,7 @@ require_once( 'includes/SiteConfiguration.php' );
 $wgConf = new SiteConfiguration;
 
 /** MediaWiki version number */
-$wgVersion                     = '1.5beta2';
+$wgVersion                     = '1.6devel';
 
 /** Name of the site. It must be changed in LocalSettings.php */
 $wgSitename         = 'MediaWiki';
@@ -121,6 +121,47 @@ $wgTmpDirectory     = "{$wgUploadDirectory}/tmp";
 $wgUploadBaseUrl    = "";
 /**#@-*/
 
+/**
+ * Allowed title characters -- regex character class
+ * Don't change this unless you know what you're doing
+ *
+ * Problematic punctuation:
+ *  []{}|#    Are needed for link syntax, never enable these
+ *  %         Enabled by default, minor problems with path to query rewrite rules, see below
+ *  +         Doesn't work with path to query rewrite rules, corrupted by apache
+ *  ?         Enabled by default, but doesn't work with path to PATH_INFO rewrites
+ *
+ * All three of these punctuation problems can be avoided by using an alias, instead of a 
+ * rewrite rule of either variety.
+ *
+ * The problem with % is that when using a path to query rewrite rule, URLs are 
+ * double-unescaped: once by Apache's path conversion code, and again by PHP. So 
+ * %253F, for example, becomes "?". Our code does not double-escape to compensate 
+ * for this, indeed double escaping would break if the double-escaped title was 
+ * passed in the query string rather than the path. This is a minor security issue 
+ * because articles can be created such that they are hard to view or edit.
+ *
+ * Theoretically 0x80-0x9F of ISO 8859-1 should be disallowed, but
+ * this breaks interlanguage links
+ */
+$wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF";
+
+
+/**
+ * The external URL protocols
+ */
+$wgUrlProtocols = array(
+       'http://',
+       'https://',
+       'ftp://',
+       'irc://',
+       'gopher://',
+       'nntp://', // @bug 3808 RFC 1738
+       'worldwind://',
+       'mailto:',
+       'news:'
+);
+
 /** internal name of virus scanner. This servers as a key to the $wgAntivirusSetup array.
  * Set this to NULL to disable virus scanning. If not null, every file uploaded will be scanned for viruses.
  * @global string $wgAntivirus
@@ -226,11 +267,6 @@ $wgMimeDetectorCommand= NULL; # use internal mime_content_type function, availab
 */
 $wgTrivialMimeDetection= false;
 
-/**
- * Produce hashed HTML article paths. Used internally, do not set.
- */
-$wgMakeDumpLinks = false;
-
 /**
  * To set 'pretty' URL paths for actions other than
  * plain page views, add to this array. For instance:
@@ -259,13 +295,15 @@ $wgFetchCommonsDescriptions = false;
 $wgSharedUploadDirectory = "/var/www/wiki3/images";
 /** DB name with metadata about shared directory. Set this to false if the uploads do not come from a wiki. */
 $wgSharedUploadDBname = false;
+/** Optional table prefix used in database. */
+$wgSharedUploadDBprefix = '';
 /** Cache shared metadata in memcached. Don't do this if the commons wiki is in a different memcached domain */
 $wgCacheSharedUploads = true;
 
 /**
  * Point the upload navigation link to an external URL
  * Useful if you want to use a shared repository by default
- * without disabling local uploads
+ * without disabling local uploads (use $wgEnableUploads = false for that)
  * e.g. $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload';
 */
 $wgUploadNavigationUrl = false;
@@ -418,6 +456,12 @@ $wgSharedDB = null;
 #                   DBO_IGNORE -- ignore errors (not useful in LocalSettings.php)
 #                   DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
 #
+#   max lag:     (optional) Maximum replication lag before a slave will taken out of rotation
+#   max threads: (optional) Maximum number of running threads
+#
+#   These and any other user-defined properties will be assigned to the mLBInfo member 
+#   variable of the Database object.
+#
 # Leave at false to use the single-server variables above
 $wgDBservers           = false;
 
@@ -440,8 +484,27 @@ $wgDBClusterTimeout = 10;
 $wgDBminWordLen     = 4;
 /** Set to true if using InnoDB tables */
 $wgDBtransactions      = false;
-/** Set to true to use enhanced fulltext search */
-$wgDBmysql4                    = false;
+/** Set to true for compatibility with extensions that might be checking.
+ * MySQL 3.23.x is no longer supported. */
+$wgDBmysql4                    = true;
+
+/**
+ * Set to true to engage MySQL 4.1/5.0 charset-related features;
+ * for now will just cause sending of 'SET NAMES=utf8' on connect.
+ *
+ * WARNING: THIS IS EXPERIMENTAL!
+ *
+ * May break if you're not using the table defs from mysql5/tables.sql.
+ * May break if you're upgrading an existing wiki if set differently.
+ * Broken symptoms likely to include incorrect behavior with page titles,
+ * usernames, comments etc containing non-ASCII characters.
+ * Might also cause failures on the object cache and other things.
+ *
+ * Even correct usage may cause failures with Unicode supplementary
+ * characters (those not in the Basic Multilingual Plane) unless MySQL
+ * has enhanced their Unicode support.
+ */
+$wgDBmysql5                    = false;
 
 /**
  * Other wikis on this site, can be administered from a single developer
@@ -465,10 +528,15 @@ $wgLinkCacheMemcached = false; # Not fully tested
  * Memcached-specific settings
  * See docs/memcached.txt
  */
+$wgUseMemCached     = false;
 $wgMemCachedDebug   = false; # Will be set to false in Setup.php, if the server isn't working
 $wgMemCachedServers = array( '127.0.0.1:11000' );
 $wgMemCachedDebug   = false;
 
+/**
+ * Directory for local copy of message cache, for use in addition to memcached
+ */
+$wgLocalMessageCache = false;
 
 
 # Language settings
@@ -545,6 +613,7 @@ $wgDisableLangConversion = false;
 
 # Use article validation feature; turned off by default
 $wgUseValidation = false;
+$wgValidationMaxTopics = 25; # Maximum number of topics
 $wgValidationForAnons = true ;
 
 # Whether to use zhdaemon to perform Chinese text processing
@@ -608,6 +677,14 @@ $wgReadOnly             = false;
 $wgLogQueries           = false;
 $wgDebugDumpSql         = false;
 
+/**
+ * Set to an array of log group keys to filenames.
+ * If set, wfDebugLog() output for that group will go to that file instead 
+ * of the regular $wgDebugLogFile. Useful for enabling selective logging
+ * in production.
+ */
+$wgDebugLogGroups       = array();
+
 /**
  * Whether to show "we're sorry, but there has been a database error" pages.
  * Displaying errors aids in debugging, but may display information useful
@@ -660,19 +737,22 @@ $wgUseCommaCount = false;
 */
 $wgHitcounterUpdateFreq = 1;
 
-# User rights settings
-#
-#  It's not 100% safe, there could be security hole using that one. Use at your
-# own risks.
-
-$wgWhitelistRead = false;      # Pages anonymous user may see, like: = array ( "Main Page", "Special:Userlogin", "Wikipedia:Help");
-
+# Basic user rights and block settings
 $wgAllowAnonymousMinor = false; # Allow anonymous users to mark changes as 'minor'
-
 $wgSysopUserBans        = true; # Allow sysops to ban logged-in users
 $wgSysopRangeBans              = true; # Allow sysops to ban IP ranges
-
 $wgAutoblockExpiry             = 86400; # Number of seconds before autoblock entries expire
+$wgBlockAllowsUTEdit    = false; # Blocks allow users to edit their own user talk page
+
+# Pages anonymous user may see as an array, e.g.:
+# array ( "Main Page", "Special:Userlogin", "Wikipedia:Help");
+# NOTE: This will only work if $wgGroupPermissions['*']['read'] 
+# is false -- see below. Otherwise, ALL pages are accessible,
+# regardless of this setting.
+# Also note that this will only protect _pages in the wiki_.
+# Uploaded files will remain readable. Make your upload 
+# directory name unguessable, or use .htaccess to protect it.
+$wgWhitelistRead = false;      
 
 /**
  * Permission keys given to users in each group.
@@ -681,6 +761,9 @@ $wgAutoblockExpiry          = 86400; # Number of seconds before autoblock entries expire
  * combined with the permissions of all groups that a given user is listed
  * in in the user_groups table.
  *
+ * Functionality to make pages inaccessible has not been extensively tested 
+ * for security. Use at your own risk!
+ * 
  * This replaces wgWhitelistAccount and wgWhitelistEdit
  */
 $wgGroupPermissions = array();
@@ -693,6 +776,8 @@ $wgGroupPermissions['user' ]['move']            = true;
 $wgGroupPermissions['user' ]['read']            = true;
 $wgGroupPermissions['user' ]['edit']            = true;
 $wgGroupPermissions['user' ]['upload']          = true;
+$wgGroupPermissions['user' ]['reupload']        = true;
+$wgGroupPermissions['user' ]['reupload-shared'] = true;
 
 $wgGroupPermissions['bot'  ]['bot']             = true;
 
@@ -707,10 +792,10 @@ $wgGroupPermissions['sysop']['patrol']          = true;
 $wgGroupPermissions['sysop']['protect']         = true;
 $wgGroupPermissions['sysop']['rollback']        = true;
 $wgGroupPermissions['sysop']['upload']          = true;
+$wgGroupPermissions['sysop']['reupload']        = true;
+$wgGroupPermissions['sysop']['reupload-shared'] = true;
 
 $wgGroupPermissions['bureaucrat']['userrights'] = true;
-// Used by the Special:Renameuser extension
-$wgGroupPermissions['bureaucrat']['renameuser'] = true;
 
 /**
  * The developer group is deprecated, but can be activated if need be
@@ -875,6 +960,15 @@ $wgDisableCookieCheck = false;
 /**  Whether to allow inline image pointing to other websites */
 $wgAllowExternalImages = true;
 
+/** If the above is false, you can specify an exception here. Image URLs 
+  * that start with this string are then rendered, while all others are not.
+  * You can use this to set up a trusted, simple repository of images.
+  *
+  * Example: 
+  * $wgAllowExternalImagesFrom = 'http://127.0.0.1/'; 
+  */
+$wgAllowExternalImagesFrom = '';
+
 /** Disable database-intensive features */
 $wgMiserMode = false;
 /** Disable all query pages if miser mode is on, not just some */
@@ -920,6 +1014,7 @@ $wgDebugSquid = false;
 
 $wgDisableCounters = false;
 $wgDisableTextSearch = false;
+$wgDisableSearchContext = false;
 /**
  * If you've disabled search semi-permanently, this also disables updates to the
  * table. If you ever re-enable, be sure to rebuild the search table.
@@ -951,6 +1046,13 @@ $wgUseDumbLinkUpdate = false;
  *       Preload links during link update for save
  *   ALF_PRELOAD_EXISTENCE
  *       Preload cur_id during replaceLinkHolders
+ *   ALF_NO_LINK_LOCK
+ *       Don't use locking reads when updating the link table. This is 
+ *       necessary for wikis with a high edit rate for performance 
+ *       reasons, but may cause link table inconsistency
+ *   ALF_NO_BLOCK_LOCK
+ *       As for ALF_LINK_LOCK, this flag is a necessity for high-traffic
+ *       wikis.
  */
 $wgAntiLockFlags = 0;
 
@@ -1063,11 +1165,29 @@ $wgSVGConverters = array(
        'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
        'inkscape' => '$path/inkscape -z -w $width -f $input -e $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',
        );
 /** Pick one of the above */
 $wgSVGConverter = 'ImageMagick';
 /** If not in the executable PATH, specify */
 $wgSVGConverterPath = '';
+/** Don't scale a SVG larger than this unless its native size is larger */
+$wgSVGMaxSize = 1024;
+/** 
+ * Don't thumbnail an image if it will use too much working memory 
+ * Default is 50 MB if decompressed to RGBA form, which corresponds to 
+ * 12.5 million pixels or 3500x3500
+ */
+$wgMaxImageArea = 1.25e7;
+/**
+ * If rendered thumbnail files are older than this timestamp, they
+ * will be rerendered on demand as if the file didn't already exist.
+ * Update if there is some need to force thumbs and SVG rasterizations
+ * to rerender, such as fixes to rendering bugs.
+ */
+$wgThumbnailEpoch = '20030516000000';
+
+
 
 /** Set $wgCommandLineMode if it's not set already, to avoid notices */
 if( !isset( $wgCommandLineMode ) ) {
@@ -1114,10 +1234,6 @@ $wgRightsIcon = NULL;
 /** Set this to some HTML to override the rights icon with an arbitrary logo */
 $wgCopyrightIcon = NULL;
 
-/* Set this to true if you want the annoying copyright confirmation
- *  checkbox at Special:Upload */
-$wgCopyrightAffirmation = false;
-
 /** Set this to true if you want detailed copyright information forms on Upload. */
 $wgUseCopyrightUpload = false;
 
@@ -1224,6 +1340,22 @@ $wgUseXMLparser = false ;
 /** Extensions */
 $wgSkinExtensionFunctions = array();
 $wgExtensionFunctions = array();
+/**
+ * An array of extension types and inside that their names, versions, authors
+ * and urls, note that the version and url key can be omitted.
+ *
+ * <code>
+ * $wgExtensionCredits[$type][] = array(
+ *     'name' => 'Example extension',
+ *      'version' => 1.9,
+ *     'author' => 'Foo Barstein',
+ *     'url' => 'http://wwww.example.com/Example%20Extension/',
+ * );
+ * </code>
+ *
+ * Where $type is 'specialpage', 'parserhook', or 'other'.
+ */
+$wgExtensionCredits = array();
 
 /**
  * Allow user Javascript page?
@@ -1248,6 +1380,13 @@ $wgUseSiteCss = true;
 /** Filter for Special:Randompage. Part of a WHERE clause */
 $wgExtraRandompageSQL = false;
 
+/**
+ * Enable the Special:Unwatchedpages special page, turned off by default  since
+ * most would consider this privelaged information as it could be used as a
+ * list of pages to vandalize.
+ */
+$wgEnableUnwatchedpages = false;
+
 /** Allow the "info" action, very inefficient at the moment */
 $wgAllowPageInfo = false;
 
@@ -1266,7 +1405,11 @@ $wgFeedLimit = 50;
 
 /** _Minimum_ timeout for cached Recentchanges feed, in seconds.
  * A cached version will continue to be served out even if changes
- * are made, until this many seconds runs out since the last render. */
+ * are made, until this many seconds runs out since the last render.
+ *
+ * If set to 0, feed caching is disabled. Use this for debugging only;
+ * feed generation can be pretty slow with diffs.
+ */
 $wgFeedCacheTimeout = 60;
 
 /** When generating Recentchanges RSS/Atom feed, diffs will not be generated for
@@ -1351,6 +1494,9 @@ $wgBrowserBlackList = array(
  * Fake out the timezone that the server thinks it's in. This will be used for
  * date display and not for what's stored in the DB. Leave to null to retain
  * your server's OS-based timezone value. This is the same as the timezone.
+ *
+ * This variable is currently used ONLY for signature formatting, not for
+ * anything else.
  */
 # $wgLocaltimezone = 'GMT';
 # $wgLocaltimezone = 'PST8PDT';
@@ -1358,6 +1504,27 @@ $wgBrowserBlackList = array(
 # $wgLocaltimezone = 'CET';
 $wgLocaltimezone = null;
 
+/**
+ * Set an offset from UTC in hours to use for the default timezone setting
+ * for anonymous users and new user accounts.
+ *
+ * This setting is used for most date/time displays in the software, and is
+ * overrideable in user preferences. It is *not* used for signature timestamps.
+ *
+ * You can set it to match the configured server timezone like this:
+ *   $wgLocalTZoffset = date("Z") / 3600;
+ *
+ * If your server is not configured for the timezone you want, you can set
+ * this in conjunction with the signature timezone and override the TZ
+ * environment variable like so:
+ *   $wgLocaltimezone="Europe/Berlin";
+ *   putenv("TZ=$wgLocaltimezone");
+ *   $wgLocalTZoffset = date("Z") / 3600;
+ *
+ * Leave at NULL to show times in universal time (UTC/GMT).
+ */
+$wgLocalTZoffset = null;
+
 
 /**
  * When translating messages with wfMsg(), it is not always clear what should be
@@ -1529,6 +1696,12 @@ $wgCountCategorizedImagesAsUsed = false;
  */
 $wgExternalStores = false;
 
+/**
+ * An array of external mysql servers, e.g.
+ * $wgExternalServers = array( 'cluster1' => array( 'srv28', 'srv29', 'srv30' ) );
+ */
+$wgExternalServers = array();
+
 /**
 * list of trusted media-types and mime types.
 * Use the MEDIATYPE_xxx constants to represent media types.
@@ -1568,4 +1741,16 @@ $wgHTTPProxy = false;
  */
 $wgEnableScaryTranscluding = false;
 
+/**
+ * Support blog-style "trackbacks" for articles.  See
+ * http://www.sixapart.com/pronet/docs/trackback_spec for details.
+ */
+$wgUseTrackbacks = false;
+
+/**
+ * Enable filtering of robots in Special:Watchlist
+ */
+
+$wgFilterRobotsWL = false;
+
 ?>