bump ver to 1.5alpha1; add some upgrade notes (needs work)
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index a8e6bce..971bb98 100644 (file)
@@ -16,7 +16,7 @@
 if( defined( 'MEDIAWIKI' ) ) {
 
 /** MediaWiki version number */
-$wgVersion                     = '1.5pre-alpha';
+$wgVersion                     = '1.5alpha1';
 
 /** Name of the site. It must be changed in LocalSettings.php */
 $wgSitename         = 'MediaWiki';
@@ -31,8 +31,11 @@ if( isset( $_SERVER['SERVER_NAME'] ) ) {
        $wgServerName = $_SERVER['SERVER_NAME'];
 } elseif( isset( $_SERVER['HOSTNAME'] ) ) {
        $wgServerName = $_SERVER['HOSTNAME'];
+} elseif( isset( $_SERVER['HTTP_HOST'] ) ) {
+       $wgServerName = $_SERVER['HTTP_HOST'];
+} elseif( isset( $_SERVER['SERVER_ADDR'] ) ) {
+       $wgServerName = $_SERVER['SERVER_ADDR'];
 } else {
-       # FIXME: Fall back on... something else?
        $wgServerName = 'localhost';
 }
 
@@ -40,7 +43,11 @@ if( isset( $_SERVER['SERVER_NAME'] ) ) {
 $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
 
 $wgServer = $wgProto.'://' . $wgServerName;
-if( isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != 80 ) {
+# If the port is a non-standard one, add it to the URL
+if(    isset( $_SERVER['SERVER_PORT'] )
+    && (    ( $wgProto == 'http' && $_SERVER['SERVER_PORT'] != 80 )
+         || ( $wgProto == 'https' && $_SERVER['SERVER_PORT'] != 443 ) ) ) {
+
        $wgServer .= ":" . $_SERVER['SERVER_PORT'];
 }
 unset($wgProto);
@@ -90,7 +97,6 @@ $wgStylePath   = "{$wgScriptPath}/skins";
  */
 $wgStyleDirectory = "{$IP}/skins";
 $wgStyleSheetPath = &$wgStylePath;
-$wgStyleSheetDirectory = &$wgStyleDirectory;
 $wgArticlePath      = "{$wgScript}?title=$1";
 $wgUploadPath       = "{$wgScriptPath}/upload";
 $wgUploadDirectory     = "{$IP}/upload";
@@ -129,10 +135,31 @@ $wgActionPaths = array();
 $wgUseSharedUploads = false;
 /** Full path on the web server where shared uploads can be found */
 $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images";
-/** Path on the file system where shared uploads can be found */
+/** Path on the file system where shared uploads can be found. */
 $wgSharedUploadDirectory = "/var/www/wiki3/images";
-/** Path on the file system where shared uploads can be found */
-$wgSharedUploadDBname = "commons";
+/** DB name with metadata about shared directory. Set this to false if the uploads do not come from a wiki. */
+$wgSharedUploadDBname = false;
+/** 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
+ * e.g. $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload';
+*/
+$wgUploadNavigationUrl = false;
+
+/** 
+ * Give a path here to use thumb.php for thumbnail generation on client request, instead of 
+ * generating them on render and outputting a static URL. This is necessary if some of your 
+ * apache servers don't have read/write access to the thumbnail path.
+ * 
+ * Example: 
+ *   $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
+ */
+$wgThumbnailScriptPath = false;
+$wgSharedThumbnailScriptPath = false;
 
 /**
  * Set the following to false especially if you have a set of files that need to
@@ -141,9 +168,6 @@ $wgSharedUploadDBname = "commons";
  */
 $wgHashedSharedUploadDirectory = true;
 
-/** set true if the repository uses latin1 filenames */
-$wgSharedLatin1=false;
-
 /**
  * Base URL for a repository wiki. Leave this blank if uploads are just stored
  * in a shared directory and not meant to be accessible through a separate wiki.
@@ -257,18 +281,21 @@ $wgSharedDB = null;
 # Database load balancer
 # This is a two-dimensional array, an array of server info structures
 # Fields are: 
-#   host:      Host name
-#   dbname:    Default database name
-#   user:      DB user
-#   password:  DB password
-#   type:      "mysql" or "pgsql"
-#   load:      ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0
-#   flags:     bit field
-#                 DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended)
-#                 DBO_DEBUG -- equivalent of $wgDebugDumpSql
-#                 DBO_TRX -- wrap entire request in a transaction
-#                 DBO_IGNORE -- ignore errors (not useful in LocalSettings.php)
-#                 DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
+#   host:        Host name
+#   dbname:      Default database name
+#   user:        DB user
+#   password:    DB password
+#   type:        "mysql" or "pgsql"
+#   load:        ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0
+#   groupLoads:  array of load ratios, the key is the query group name. A query may belong 
+#                to several groups, the most specific group defined here is used.
+#                 
+#   flags:       bit field
+#                   DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended)
+#                   DBO_DEBUG -- equivalent of $wgDebugDumpSql
+#                   DBO_TRX -- wrap entire request in a transaction
+#                   DBO_IGNORE -- ignore errors (not useful in LocalSettings.php)
+#                   DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
 #
 # Leave at false to use the single-server variables above
 $wgDBservers           = false; 
@@ -291,7 +318,6 @@ $wgDBminWordLen     = 4;
 $wgDBtransactions      = false;
 /** Set to true to use enhanced fulltext search */
 $wgDBmysql4                    = false;
-$wgSqlTimeout          = 30;
 
 /**
  * Other wikis on this site, can be administered from a single developer
@@ -300,45 +326,30 @@ $wgSqlTimeout             = 30;
  */ 
 $wgLocalDatabases   = array();
 
+/**
+ * Object cache settings
+ * See Defines.php for types
+ */
+$wgMainCacheType = CACHE_NONE;
+$wgMessageCacheType = CACHE_ANYTHING;
+$wgParserCacheType = CACHE_ANYTHING;
 
-# Memcached settings
-# See docs/memcached.doc
-#
-$wgMemCachedDebug   = false; # Will be set to false in Setup.php, if the server isn't working
-$wgUseMemCached     = false;
-$wgMemCachedServers = array( '127.0.0.1:11000' );
-$wgMemCachedDebug   = false;
 $wgSessionsInMemcached = false;
 $wgLinkCacheMemcached = false; # Not fully tested
 
 /**
- * Turck MMCache shared memory
- * You can use this for persistent caching where your wiki runs on a single 
- * server. Enabled by default if Turck is installed. Mutually exclusive with
- * memcached and eAccelerator, the preference order priorities being memcached first, 
- * Turck MMCache second, and eAccelerator third.
- *
- * @global bool $wgUseTurckShm Enable or disabled Turck MMCache
+ * Memcached-specific settings
+ * See docs/memcached.txt
  */
-$wgUseTurckShm      = 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;
 
-/**
- * eAccelerator shared memory
- * You can use this for persistent caching where your wiki runs on a single 
- * server. Enabled by default if eAccelerator is installed. Mutually exclusive with
- * memcached and Turck MMCache, the preference order being memcached first, 
- * Turck MMCache second, and eAccelerator third.
- *
- * Most of the code to support this is directly copied from the Turck code.
- *
- * @global bool $wgUseEAccelShm Enable or disabled eAccelerator
- */
-$wgUseEAccelShm     = false;
 
 
 # Language settings
 #
-/** Site language code, should be one of ./language/Language(.*).php */
+/** Site language code, should be one of ./languages/Language(.*).php */
 $wgLanguageCode     = 'en';
 
 /** Filename of a language file generated by dumpMessages.php */
@@ -369,7 +380,9 @@ $wgDTD                              = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd';
 /** Enable to allow rewriting dates in page text.
  * DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES */
 $wgUseDynamicDates  = false; 
-/** Enable for English module to print dates as eg 'May 12' instead of '12 May' */
+/** Enable dates like 'May 12' instead of '12 May', this only takes effect if
+ * the interface is set to English
+ */
 $wgAmericanDates    = false; 
 /**
  * For Hindi and Arabic use local numerals instead of Western style (0-9)
@@ -513,8 +526,8 @@ $wgWhitelistAccount = array ( 'user' => 1, 'sysop' => 1, 'developer' => 1 );
 
 $wgAllowAnonymousMinor = false; # Allow anonymous users to mark changes as 'minor'
 
-$wgSysopUserBans        = false; # Allow sysops to ban logged-in users
-$wgSysopRangeBans              = false; # Allow sysops to ban IP ranges
+$wgSysopUserBans        = true; # Allow sysops to ban logged-in users
+$wgSysopRangeBans              = true; # Allow sysops to ban IP ranges
 
 /** Comma-separated list of options to show on the IP block form. 
   * Use strtotime() format, or "infinite" for an infinite block 
@@ -523,6 +536,14 @@ $wgBlockExpiryOptions = "2 hours,1 day,3 days,1 week,2 weeks,1 month,3 months,6
 
 $wgAutoblockExpiry             = 86400; # Number of seconds before autoblock entries expire
 
+/**
+ * Static user groups serialized record
+ * To avoid database access, you can set this to a user groups record as returned 
+ * by Special:Groups with the magic parameter showrecord=1. This will however mean 
+ * that you won't be able to edit them at runtime.
+ */
+$wgStaticGroups = false;
+
 # Proxy scanner settings
 #
 
@@ -659,6 +680,10 @@ $wgSquidServersNoPurge = array();
 /** Maximum number of titles to purge in any one client operation */
 $wgMaxSquidPurgeTitles = 400;
 
+/** HTCP multicast purging */
+$wgHTCPPort = 4827;
+$wgHTCPMulticastTTL = 1;
+# $wgHTCPMulticastAddress = "224.0.0.85";
 
 # Cookie settings:
 #
@@ -724,7 +749,13 @@ $wgDisableTextSearch = false;
  */
 $wgDisableSearchUpdate = false;
 /** Uploads have to be specially set up to be secure */
-$wgDisableUploads = true;
+$wgEnableUploads = false;
+/**
+ * Show EXIF data, on by default if available.
+ * Requires PHP's EXIF extension: http://www.php.net/manual/en/ref.exif.php
+ */
+$wgShowEXIF = function_exists( 'exif_read_data' );
+
 /**
  * Set to true to enable the upload _link_ while local uploads are disabled.
  * Assumes that the special page link will be bounced to another server where
@@ -774,7 +805,7 @@ $wgCheckFileExtensions = true;
 $wgStrictFileExtensions = true;
 
 /** Warn if uploaded files are larger than this */
-$wgUploadSizeWarning = 150000;
+$wgUploadSizeWarning = 150 * 1024;
 
 /** For compatibility with old installations set to false */
 $wgPasswordSalt = true; 
@@ -802,8 +833,25 @@ $wgNamespacesWithSubpages = array(
        NS_CATEGORY_TALK => 1
  );
 
-$wgNamespacesToBeSearchedDefault = array( NS_SPECIAL => 0, 0 => 1, 1 => 0,
-  2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 1, 10 => 0, 11 => 1 );
+$wgNamespacesToBeSearchedDefault = array(
+       NS_SPECIAL => 0,
+       NS_MAIN => 1,
+       NS_TALK => 0,
+       NS_USER => 0,
+       NS_USER_TALK => 0,
+       NS_PROJECT => 0,
+       NS_PROJECT_TALK => 0,
+       NS_IMAGE => 0,
+       NS_IMAGE_TALK => 0,
+       NS_MEDIAWIKI => 0,
+       NS_MEDIAWIKI_TALK => 1,
+       NS_TEMPLATE => 1,
+       NS_TEMPLATE_TALK => 1,
+       NS_HELP => 0,
+       NS_HELP_TALK => 0,
+       NS_CATEGORY => 0,
+       NS_CATEGORY_TALK => 0
+);
 
 /** If set, a bold ugly notice will show up at the top of every page. */
 $wgSiteNotice = '';
@@ -954,13 +1002,20 @@ $wgRawHtml = false;
  * $wgTidyBin should be set to the path of the binary and
  * $wgTidyConf to the path of the configuration file.
  * $wgTidyOpts can include any number of parameters.
+ *
+ * $wgTidyInternal controls the use of the PECL extension to use an in-
+ *   process tidy library instead of spawning a separate program.
+ *   Normally you shouldn't need to override the setting except for
+ *   debugging. To install, use 'pear install tidy' and add a line
+ *   'extension=tidy.so' to php.ini.
  */
 $wgUseTidy = false;
 $wgTidyBin = 'tidy';
 $wgTidyConf = $IP.'/extensions/tidy/tidy.conf'; 
 $wgTidyOpts = '';
+$wgTidyInternal = function_exists( 'tidy_load_config' );
 
-/** See list of skins and their symbolic names in languagel/Language.php */
+/** See list of skins and their symbolic names in languages/Language.php */
 $wgDefaultSkin = 'monobook';
 
 /**
@@ -1040,8 +1095,8 @@ $wgFeedDiffCutoff = 32768;
  * no longer be accessible. If you rename it, then you can access them through
  * the new namespace name.
  * 
- * Custom namespaces should start at 100 and stop at 255 (hard limit set by
- * database).
+ * Custom namespaces should start at 100 to avoid conflicting with standard
+ * namespaces, and should always follow the even/odd main/talk pattern.
  */
 #$wgExtraNamespaces =
 #      array(100 => "Hilfe",
@@ -1051,16 +1106,6 @@ $wgFeedDiffCutoff = 32768;
 #            );
 $wgExtraNamespaces = NULL;
 
-/**
- * Enable SOAP interface. Off by default
- * SOAP is a protocoll for remote procedure calls (RPC) using http as
- * middleware. This interface can be used by bots or special clients to receive
- * articles from a wiki.
- * Most bots use the normal HTTP interface and don't use SOAP.
- * If unsure, set to false.
- */
-$wgEnableSOAP = false;
-
 /**
  * Limit images on image description pages to a user-selectable limit. In order
  * to reduce disk usage, limits can only be selected from a list. This is the
@@ -1074,6 +1119,19 @@ $wgImageLimits = array (
        array(1280,1024),
        array(10000,10000) );
 
+/**
+ * Adjust thumbnails on image pages according to a user setting. In order to
+ * reduce disk usage, the values can only be selected from a list. This is the
+ * list of settings the user can choose from:
+ */
+$wgThumbLimits = array(
+       120,
+       150,
+       180,
+       200,
+       250,
+       300
+);
 
 /** Navigation links for the user sidebar.
  * 'text' is the name of the MediaWiki message that contains the label of this link
@@ -1102,9 +1160,21 @@ $wgCategoryMagicGallery = true;
  * Contains a list of regexps : "/regexp/"  matching problematic browsers
  */
 $wgBrowserBlackList = array(
-       "/Mozilla\/4\.78 \[en\] \(X11; U; Linux/"
-       // FIXME: Add some accurate, true things here
-       );
+       "/Mozilla\/4\.78 \[en\] \(X11; U; Linux/",
+       /**
+        * MSIE on Mac OS 9 is teh sux0r, converts þ to <thorn>, ð to <eth>, Þ to <THORN> and Ð to <ETH>
+        *
+        * Known useragents:
+        * - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
+        * - Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
+        * - Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
+        * - [...]
+        *
+        * @link http://en.wikipedia.org/w/index.php?title=User%3A%C6var_Arnfj%F6r%F0_Bjarmason%2Ftestme&diff=12356041&oldid=12355864
+        * @link http://en.wikipedia.org/wiki/Template%3AOS9
+        */
+       "/Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/"
+);
 
 /**
  * Fake out the timezone that the server thinks it's in. This will be used for
@@ -1126,6 +1196,7 @@ $wgAnonGroupId = 1;
 $wgLoggedInGroupId = 2;
 $wgSysopGroupId = 3;
 $wgBureaucratGroupId = 4;
+$wgStewardGroupId = 5;
 
 /**
  * When translating messages with wfMsg(), it is not always clear what should be
@@ -1220,7 +1291,24 @@ $wgDisabledActions = array();
 /**
  * Use http.dnsbl.sorbs.net to check for open proxies
  */
-$wgEnableSorbs = true;
+$wgEnableSorbs = false;
+
+/**
+ * On Special:Unusedimages, consider images "used", if they are put
+ * into a category. Default (false) is not to count those as used.
+ */
+$wgCountCategorizedImagesAsUsed = false;
+
+/** 
+ * External stores allow including content 
+ * from non database sources following URL links
+ * 
+ * Short names of ExternalStore classes may be specified in an array here:
+ * $wgExternalStores = array("http","file","custom")...
+ * 
+ * CAUTION: Access to database might lead to code execution
+ */
+$wgExternalStores = false;
 
 } else {
        die();