Avoid undefined variable error on null edits
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index 350e772..1770080 100644 (file)
@@ -1,8 +1,11 @@
 <?php
 /**
- * DO NOT EDIT THIS FILE!
  *
- * To customize your installation, edit "LocalSettings.php".
+ *                 DO NOT EVER EDIT THIS FILE!
+ *
+ *
+ * To customize your installation, edit "LocalSettings.php". If you make
+ * changes here, they will be lost on next upgrade of MediaWiki!
  *
  * Note that since all these string interpolations are expanded
  * before LocalSettings is included, if you localize something
@@ -28,7 +31,7 @@ require_once( 'includes/SiteConfiguration.php' );
 $wgConf = new SiteConfiguration;
 
 /** MediaWiki version number */
-$wgVersion                     = '1.6alpha';
+$wgVersion                     = '1.6devel';
 
 /** Name of the site. It must be changed in LocalSettings.php */
 $wgSitename         = 'MediaWiki';
@@ -37,7 +40,7 @@ $wgSitename         = 'MediaWiki';
 $wgMetaNamespace    = FALSE;
 
 
-/** URL of the server. It will be automaticly build including https mode */
+/** URL of the server. It will be automatically built including https mode */
 $wgServer = '';
 
 if( isset( $_SERVER['SERVER_NAME'] ) ) {
@@ -148,9 +151,19 @@ $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF";
 
 
 /**
- * The external URL protocols (regexp)
+ * The external URL protocols
  */
-$wgUrlProtocols = 'http:\/\/|https:\/\/|ftp:\/\/|irc:\/\/|gopher:\/\/|news:|mailto:';
+$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.
@@ -231,13 +244,13 @@ $wgVerifyMimeType= true;
 */
 #$wgMimeTypeFile= "/etc/mime.types";
 $wgMimeTypeFile= "includes/mime.types";
-#$wgMimeTypeFile= NULL; #use builin defaults only.
+#$wgMimeTypeFile= NULL; #use built-in defaults only.
 
 /** Sets the mime type info file to use by MimeMagic.php.
 * @global string $wgMimeInfoFile
 */
 $wgMimeInfoFile= "includes/mime.info";
-#$wgMimeInfoFile= NULL; #use builin defaults only.
+#$wgMimeInfoFile= NULL; #use built-in defaults only.
 
 /** Switch for loading the FileInfo extension by PECL at runtime.
 * This should be used only if fileinfo is installed as a shared object / dynamic libary
@@ -250,18 +263,13 @@ $wgLoadFileinfoExtension= false;
 * If not set or NULL, mime_content_type will be used if available.
 */
 $wgMimeDetectorCommand= NULL; # use internal mime_content_type function, available since php 4.3.0
-#$wgMimeDetectorCommand= "file -bi" #use external mime detector (linux)
+#$wgMimeDetectorCommand= "file -bi"; #use external mime detector (Linux)
 
 /** Switch for trivial mime detection. Used by thumb.php to disable all fance things,
 * because only a few types of images are needed and file extensions can be trusted.
 */
 $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:
@@ -451,6 +459,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;
 
@@ -477,6 +491,24 @@ $wgDBtransactions  = false;
  * 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
  * account.
@@ -504,6 +536,10 @@ $wgMemCachedDebug   = false; # Will be set to false in Setup.php, if the server
 $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
@@ -580,6 +616,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
@@ -703,21 +740,23 @@ $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.
  * All users are implicitly in the '*' group including anonymous visitors;
@@ -725,6 +764,9 @@ $wgBlockAllowsUTEdit    = false; # Blocks allow users to edit their own user tal
  * 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();
@@ -732,10 +774,14 @@ $wgGroupPermissions = array();
 $wgGroupPermissions['*'    ]['createaccount']   = true;
 $wgGroupPermissions['*'    ]['read']            = true;
 $wgGroupPermissions['*'    ]['edit']            = true;
+$wgGroupPermissions['*'    ]['createpage']      = true;
+$wgGroupPermissions['*'    ]['createtalk']      = true;
 
 $wgGroupPermissions['user' ]['move']            = true;
 $wgGroupPermissions['user' ]['read']            = true;
 $wgGroupPermissions['user' ]['edit']            = true;
+$wgGroupPermissions['user' ]['createpage']      = true;
+$wgGroupPermissions['user' ]['createtalk']      = true;
 $wgGroupPermissions['user' ]['upload']          = true;
 $wgGroupPermissions['user' ]['reupload']        = true;
 $wgGroupPermissions['user' ]['reupload-shared'] = true;
@@ -921,6 +967,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 */
@@ -966,6 +1021,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.
@@ -1124,6 +1180,21 @@ $wgSVGConverter = 'ImageMagick';
 $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 ) ) {
@@ -1341,7 +1412,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